version: 0.245-1af3d

0.1. How to enable the SmartTrackStack

Calling cmake -DG4_USESMARTSTACK … will not work, because that sets a CMake cache variable. What we want is to pass a preprocessor macro in g++. The proper way to do that is to add the following in the CMakeLists.txt file:

add_definitions(-DG4_USESMARTSTACK)

or modify the CMAKE_CXX_FLAGS variable, again inside the CMakeLists.txt.

Also, for if building the granular libraries with gmake, one needs to add -DG4_USESMARTSTACK in the respective GNUmakefile (geant4.9.5.p01/source/event/GNUmakefile):

CPPFLAGS += -DG4EVENT_ALLOC_EXPORT -DG4_USESMARTSTACK

0.2. The effect of SmartTrackStack on time spent by a ::ProcessOneEvent() call

[script] [full-size plot] cmpevts.png

0.2.1. Histogram of ::ProcessOneEvent() time spent

histcmpevts.png

timeflame.orig.svg

(Click on the image to enlarge)

timeflame.patc.svg

(Click on the image to enlarge)

0.3. The effect of SmartTrackStack on Cycles Per Instruction ratio

[script] [full-size plot]

cmpcpits.png

0.4. Histograms of Cycle Per Instruction ratio

histcmpcpi.png

0.5. The effect of SmartTrackStack on Cache Misses

0.5.1. Data Cache misses (as a time series)

[script] [full-size plot]

cmpdcmts.png

0.5.2. Histogram of Data Cache misses

histcmpdcm.png

0.5.3. Flame/leaf graphs of Data Cache misses

dcmflame.orig.svg

(Click on the image to enlarge)

dcmflame.patc.svg

(Click on the image to enlarge)

0.5.4. Instruction Cache misses (as a time series)

[script] [full-size plot]

cmpicmts.png

0.5.5. Histogram of Instruction Cache misses

histcmpicm.png

0.5.6. Flame/leaf graphs of Instruction Cache misses

icmflame.orig.svg

(Click on the image to enlarge)

icmflame.patc.svg

(Click on the image to enlarge)