- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page