parameter for cilk_leave_begin ZCA

parameter for cilk_leave_begin ZCA

Imagen de angelee@mit.edu

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 

publicaciones de 4 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.
Imagen de angelee@mit.edu

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 

Imagen de Barry Tannenbaum (Intel)

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

Imagen de angelee@mit.edu

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

Thanks!
Angelina 

Inicie sesión para dejar un comentario.