Messages in this thread | | | Date | Wed, 10 Apr 1996 10:00:45 +0200 (MET DST) | From | Bernd Schmidt <> | Subject | Re: 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 :).
| |