Browse Source

faster Tau on Linux

David Rose 19 years ago
parent
commit
95d10754c0

+ 1 - 1
dtool/pptempl/Depends.pp

@@ -87,7 +87,7 @@
       #push 1 $[file]_obj
       #push 1 $[file]_obj
     #end file
     #end file
 
 
-    #if $[and $[not $[DONT_COMBINE]],$[or $[USE_SINGLE_COMPOSITE_SOURCEFILE],$[and $[USE_TAU],$[WINDOWS_PLATFORM]]]]
+    #if $[and $[not $[DONT_COMBINE]],$[or $[USE_SINGLE_COMPOSITE_SOURCEFILE],$[USE_TAU]]]
       #if $[> $[words $[cxx_sources]], 1]
       #if $[> $[words $[cxx_sources]], 1]
         // If we have multiple C++ files, put them together into one
         // If we have multiple C++ files, put them together into one
         // composite file.
         // composite file.

+ 7 - 0
dtool/pptempl/Template.unix.pp

@@ -166,7 +166,14 @@
 /* ################################# DO NOT EDIT ########################### */
 /* ################################# DO NOT EDIT ########################### */
 
 
 #foreach file $[$[composite_file]_sources]
 #foreach file $[$[composite_file]_sources]
+#if $[USE_TAU]
+// For the benefit of Tau, we copy the source file verbatim into the
+// composite file.  (Tau doesn't instrument files picked up via #include.)
+#copy $[DIRPREFIX]$[file]
+
+#else
 ##include "$[file]"
 ##include "$[file]"
+#endif  // USE_TAU
 #end file
 #end file
 
 
 #end $[composite_file]
 #end $[composite_file]

+ 3 - 7
dtool/src/dconfig/dconfig.cxx

@@ -18,11 +18,7 @@
 
 
 #include "dconfig.h"
 #include "dconfig.h"
 
 
-namespace Config {
-
-  clock_t total_time_config_init = 0;
-  clock_t total_time_external_init = 0;
-  int total_num_get = 0;
-
-}
+clock_t Config::total_time_config_init = 0;
+clock_t Config::total_time_external_init = 0;
+int Config::total_num_get = 0;
 
 

+ 3 - 2
panda/src/pgraph/Sources.pp

@@ -7,8 +7,9 @@
 #begin lib_target
 #begin lib_target
   #define TARGET pgraph
   #define TARGET pgraph
 
 
-  // This directory is too big to combine into a single composite file.
-  #define DONT_COMBINE 1
+  // This directory is too big to combine into a single composite
+  // file--at least on Windows.
+  #define DONT_COMBINE $[WINDOWS_PLATFORM]
 
 
   #define SOURCES \
   #define SOURCES \
     accumulatedAttribs.I accumulatedAttribs.h \
     accumulatedAttribs.I accumulatedAttribs.h \