- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am analyzing C++ codes to find data races in them using intel pin
Now I found some inbuilt functions in Intel Pin like INS_IsMemoryRead and INS_IsMemoryWrite to determine if a instruction is memory read or write respectively Now I want to achive the same for lock acquire and lock release (only for C++ pthread_mutex) but I didn't find any such function
So I disassembled the lock acquire statement and found a lock prefix and a cmpxchg statement
So I decided to use lockPrefix function of Intel Pin to determine if the instruction has lock prefix and INS_Opcode function to check if xed value is cmpxchg and then check if the adress being written to has value 1 then we can say lock acquire is successful
But I believe there is something simpler and also have doubts regarding correctness of my approach
Now I found some inbuilt functions in Intel Pin like INS_IsMemoryRead and INS_IsMemoryWrite to determine if a instruction is memory read or write respectively Now I want to achive the same for lock acquire and lock release (only for C++ pthread_mutex) but I didn't find any such function
So I disassembled the lock acquire statement and found a lock prefix and a cmpxchg statement
So I decided to use lockPrefix function of Intel Pin to determine if the instruction has lock prefix and INS_Opcode function to check if xed value is cmpxchg and then check if the adress being written to has value 1 then we can say lock acquire is successful
But I believe there is something simpler and also have doubts regarding correctness of my approach
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
7 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is this related to FPGA question?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am really sorry but I don't understand what you mean by "FPGA question"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You may refer to here https://www.intel.com/content/www/us/en/products/overview.html
Is this related to FPGA product?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there any update?
- 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
upon checking, this is not a FPGA question.. Can you post your question to the right category in the below? https://community.intel.com/t5/Product-Support-Forums/ct-p/product-support-forums
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
closing the non fpga related question

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page