Messages in this thread | | | Date | Sun, 29 Sep 2002 03:52:25 +0100 | From | John Levon <> | Subject | Re: [PATCH][RFC] oprofile for 2.5.39 |
| |
On Sun, Sep 29, 2002 at 04:29:14AM +0200, Andi Kleen wrote:
> Can you explain what you need the context switch hook for ?
Hmm, I tried to explain this in comments in the patch ...
> I don't think it's a good idea to put a hook at such a critical place.
... but I obviously didn't do a very good job.
We need a context to look up the EIP against when we process each sample in buffer_sync.c. We could just log current at sample time along with EIP/event, but why would it be preferrable to just logging the same information once when it's needed ?
Basically it's a matter of :
task_struct * EIP/Event EIP/Event EIP/Event EIP/Event ....
versus
task_struct */EIP/Event task_struct */EIP/Event task_struct */EIP/Event task_struct */EIP/Event task_struct */EIP/Event ....
Where task_struct is the same as the previous entry for the vast majority of entries.
> 2.4 oprofile worked without such a hook, no ?
Sure, but it was ugly as hell (and worked completely differently)
regards john
-- "When your name is Winner, that's it. You don't need a nickname." - Loser Lane - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |