version: 0.206-28599

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 Cycles Per Instruction ratio

[script] [full-size plot]

cmpcpits.png

0.3. Histograms of Cycle Per Instruction ratio

histcmpcpi.png

0.4. The effect of SmartTrackStack on Cache Misses

0.4.1. Data Cache misses (as a time series)

[script] [full-size plot]

cmpdcmts.png

0.4.2. Instruction Cache misses (as a time series)

[script] [full-size plot]

cmpicmts.png

0.4.3. Histogram of Data Cache misses

histcmpdcm.png

0.4.4. Histogram of Instruction Cache misses

histcmpicm.png