overflow handler void* context

Open discussion of PAPI.

overflow handler void* context

Postby SDiersen » Mon Jan 30, 2012 5:51 pm

The description for void *context : context -- a platform dependent structure containing information about the state of the machine when the overflow occurred. This structure is provided for completeness, but can generally be ignored by most users.

I am assuming this is the context switch information; specifically for linux this would be the task_struct structure. I would like to use PAPI in order to gain access to the task_struct structure, but I am unsure how to get the information out of the context parameter.

Any help would be appreciated, even pointing me in the right direction for questions to ask!
SDiersen
 
Posts: 1
Joined: Mon Jan 30, 2012 3:38 pm

Re: overflow handler void* context

Postby vweaver1 » Tue Feb 07, 2012 5:50 pm

It should be enough to cast the context pointer to a ucontext_t and then accessing the fields. None of our tests currently use the context field so I'm not sure how well tested this is.
vweaver1
 
Posts: 50
Joined: Wed Feb 17, 2010 4:02 pm


Return to General discussion

Who is online

Users browsing this forum: No registered users and 1 guest