- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Not directly related to C/C++ but I have always used Intel Inspector for many years on both Windows and Linux to track tricky threading and memory access issues.
Now that it is being retired, what alternatives do people have? Particularly on Windows. Looking for a tool that does not required the code to be recompiled.
On Linux, valgrind is "OK", but it suffers from being open source, and the lack of a GUI makes it painful to use.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Sanitizer is able to do the thread checking too, suppose you have a source code tiny_race.cpp:
icpx -fsanitize=thread -g tiny_race.cpp
icpx: remark: Note that use of '-g' without any optimization-level option will turn off most compiler optimizations similar to use of '-O0'; use '-Rno-debug-disables-optimization' to disable this remark [-Rdebug-disables-optimization]
sravanik@ortce-skl22:~$ ./a.out
==================
WARNING: ThreadSanitizer: data race (pid=1974537)
Write of size 4 at 0x000001913ae8 by main thread:
#0 main /nfs/pdx/home/tiny_race.cpp:10:10 (a.out+0x4e57de)
Previous write of size 4 at 0x000001913ae8 by thread T1:
#0 Thread1(void*) /nfs/pdx/home/tiny_race.cpp:4:10 (a.out+0x4e577b)
Location is global 'Global' of size 4 at 0x000001913ae8 (a.out+0x1913ae8)
Thread T1 (tid=1974557, finished) created by main thread at:
#0 pthread_create <null> (a.out+0x436463)
#1 main /nfs/pdx/home/tiny_race.cpp:9:3 (a.out+0x4e57d4)
SUMMARY: ThreadSanitizer: data race /nfs/pdx/home/tiny_race.c:10:10 in main
==================
ThreadSanitizer: reported 1 warnings
Lien copié
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
My comments
- it requires the code be recompiled with new options - another special build.
- I used Intel Inspector for diagnosing tricky threading issues, not just memory issues.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Sanitizer is able to do the thread checking too, suppose you have a source code tiny_race.cpp:
icpx -fsanitize=thread -g tiny_race.cpp
icpx: remark: Note that use of '-g' without any optimization-level option will turn off most compiler optimizations similar to use of '-O0'; use '-Rno-debug-disables-optimization' to disable this remark [-Rdebug-disables-optimization]
sravanik@ortce-skl22:~$ ./a.out
==================
WARNING: ThreadSanitizer: data race (pid=1974537)
Write of size 4 at 0x000001913ae8 by main thread:
#0 main /nfs/pdx/home/tiny_race.cpp:10:10 (a.out+0x4e57de)
Previous write of size 4 at 0x000001913ae8 by thread T1:
#0 Thread1(void*) /nfs/pdx/home/tiny_race.cpp:4:10 (a.out+0x4e577b)
Location is global 'Global' of size 4 at 0x000001913ae8 (a.out+0x1913ae8)
Thread T1 (tid=1974557, finished) created by main thread at:
#0 pthread_create <null> (a.out+0x436463)
#1 main /nfs/pdx/home/tiny_race.cpp:9:3 (a.out+0x4e57d4)
SUMMARY: ThreadSanitizer: data race /nfs/pdx/home/tiny_race.c:10:10 in main
==================
ThreadSanitizer: reported 1 warnings
- S'abonner au fil RSS
- Marquer le sujet comme nouveau
- Marquer le sujet comme lu
- Placer ce Sujet en tête de liste pour l'utilisateur actuel
- Marquer
- S'abonner
- Page imprimable