version: 0.198-e085d

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 on SmartTrackStack on Cache Misses

0.2.1. Data Cache misses (as a time series)

[script] [full-size plot]

cmpdcmts.png

0.2.2. Instruction Cache misses (as a time series)

[script] [full-size plot]

cmpicmts.png

0.2.3. Histogram of Data Cache misses

histcmpdcm.png

0.2.4. Histogram of Instruction Cache misses

histcmpicm.png