lkml.org 
[lkml]   [2002]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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/

\
 
 \ /
  Last update: 2005-03-22 13:29    [W:1.057 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site