- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am looking into building a Pin tool that uses the ZCA generated for Cilk Plus, and I have a question that is not answer by the document "Intrisics for Low Overhead Annotations."
In particular, I am wondering what is the parameter passed to the cilk_leave_begin annotation (the document says some stable stack pointer, but it doesn't say what). According to the document, cilk_enter_begin takes the pointer to cilkrts_stack_frame corresponding of the executing Cilk function, so I wondered if the cilk_leave_begin takes either the same cilkrts_stack_frame as cilk_enter_begin, or the cilkrts_stack_frame of its immediate Cilk ancestor frame. It turns out that, it's neither. (This is confirmed by writing a simple Pin tool that intercepts cilk_enter_begin and cilk_leave_begin and print out the parameters.) Out of curiousity, what exactly does cilk_leave_frame take for parameter?
Thanks,
Angelina
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Actually, upon second reading, it sounds like the parameter is not just "some" stack pointer, but rather, literally, it's "the" stack pointer, i.e., the lower-address end of the stack frame, corresponding to the currently executing function (whether that's a spawning function or a spawn helper function). Is my reading correct?
Thanks,
Angelina
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Angelina.
Yes. That's exactly what it is. The stack pointer for the function, after all locals have been allocated. I trust you're using zcalib instead of starting from scratch and parsing the ZCA data yourself.
- Barry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes. I am using libzca. Now it makes sense to me why I am seeing the values I am seeing.
Thanks!
Angelina

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