Multithreaded smoketest produces no end events
Opened this issue · 1 comments
slabasan commented
First reported by Henry on turing, but can also produce on lassen.
mkdir build
cd build
cmake -C ../host-configs/lassen*.cmake -DPERFFLOWASPECT_WITH_MULTITHREADING=ON ../
make
Running
$ cd test
$ ./smoketest_MT
This is worker_thread() 3
This is worker_thread() 2
This is worker_thread() 1
$ cat perfflow.lassen709.19136.pfw
[
{"name": "foo", "cat": "/g/g19/brink2/git_root_pub/PerfFlowAspect/src/c/test/smoketest_MT.cpp", "pid": 19136, "tid": 19138, "ts": 1714069138376341.0, "ph": "B"},
{"name": "foo", "cat": "/g/g19/brink2/git_root_pub/PerfFlowAspect/src/c/test/smoketest_MT.cpp", "pid": 19136, "tid": 19139, "ts": 1714069138376361.0, "ph": "B"},
{"name": "foo", "cat": "/g/g19/brink2/git_root_pub/PerfFlowAspect/src/c/test/smoketest_MT.cpp", "pid": 19136, "tid": 19137, "ts": 1714069138376325.0, "ph": "B"},
Test notes:
- Smoketest with pointcut=after produces pfw file with all E events
- Smoketest_MT with pointcut=before produces pfw file with all B events
- Smoketest_MT with pointcut=after produces no pfw file
Could be an issue with locks. Perhaps using the same lock causes problem with threads. Would adding another lock variable and using different ones solve the problem?
tpatki commented
Capturing notes from discussion with @slabasan .
The different cases need to be clearly documented and tested.
- after + compact format has no if-statement currently and will fail
- pid/tid is not getting added correctly to the default case
- No file is being created for smoketest_MT with pointcut=after: this needs to be debugged.