lkml.org 
[lkml]   [1996]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Accessing Pentium MSRs

> > Over the weekend, I crufted together a little kernel patch that adds two
> > syscalls to let processes access some of the Pentium MSR registers. Using these
> > event counters, you can analyze how your code behaves (e.g. how often the
> > second pipeline is in use, or how many branches are taken). If someone is
> > interested, I'll post the patch here.
>
> Sounds useful. I assume you are also saving/restoring the values over
> context switches ?. Would making the MSR access a ptrace extension be better
> than new syscalls ?

Yes, I modified the tss and the switch_to macro. Every task can count its own
events. I'll tidy the code up a little and post it (probably) on Friday. I
won't do it as a ptrace extension, though, since I have no idea about how to do
that :).


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