parameter for cilk_leave_begin ZCA

parameter for cilk_leave_begin ZCA

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 

4 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.

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 

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

Yes.  I am using libzca.  Now it makes sense to me why I am seeing the values I am seeing.

Thanks!
Angelina 

Melden Sie sich an, um einen Kommentar zu hinterlassen.