Paul van den Bogaard
2006-Dec-13 15:45 UTC
[dtrace-discuss] Access hardware counters with DTrace
Could find a thread dated jun 2005 where this was raised by Brendan Greg. Basic question still is if it is possible to get access to the CPU hardware counters using DTrace. --Paul This message posted from opensolaris.org
Jonathan Haslam
2006-Dec-13 16:25 UTC
[dtrace-discuss] Access hardware counters with DTrace
Hi Paul,>Could find a thread dated jun 2005 where this was raised by Brendan Greg. >Basic question still is if it is possible to get access to the CPU hardware counters using DTrace. >At the minute the answer is, no. However, I created a prototype of a performance counter provider a while ago and I''ve (literally!) just started another push on it. There is a placeholder RFE: 6486156: DTrace cpc provider If you are interested in getting some bits to play around with, contact me off-alias. Cheers. Jon.
Jonathan Haslam
2006-Dec-13 17:05 UTC
[dtrace-discuss] Access hardware counters with DTrace
Frank Hoffman replied to Paul''s initial question but the cc: got "magically" altered to ''opensolaris-discuss at opensolaris.org''. For those that aren''t on that alias, Frank''s reply was:> Can you provide a reference URL for that thread ? > > The "normal" method to access the PMCs is via cpc(3CPC), or > cputrack(1M). Probably mentioned in the orig thread, hence the > question for the reference. Also curious as to what exactly it is you > need them for in DTrace ? Can you give us a "mockup D" of what you''d > like to have ? > > Thanks, > FrankH.and my reply to Frank was:>> The "normal" method to access the PMCs is via cpc(3CPC), or >> cputrack(1M). Probably mentioned in the orig thread, hence the >> question for the reference. Also curious as to what exactly it is you >> need them for in DTrace ? > > > The *huge* advantage that you get with DTrace is that of context. > Being able to tie user-land or kernel context on a global basis > to events is a massive advantage over what is there at the minute. > > Imagine just being able to get a global view of exactly where > your DTLB misses are coming from. That''s powerful stuff. > > Jon.
Paul van den Bogaard
2006-Dec-13 17:20 UTC
[dtrace-discuss] Re: Access hardware counters with DTrace
So lets continue on this thread: the URL requested: http://www.opensolaris.org/jive/thread.jspa?messageID=3756ຬ As Jon explained it is indeed the context that the events are happening that might be extremely helpfull here. I know I have L2 misses. Not a clue what''s causing this. Same holds for all other samplers available. System wide statistisc do not enable easy drill down to the application(s) that are causing it. It is even a bigger challenge to determine why they are causing this. Since most apps do not have appropriate instrumentation build in --and most who do, don''t have docs helping you to understand which knobs, if any, there are in order to fiddle with it. So the next best thing is a util like DTrace. --Paul This message posted from opensolaris.org
Hi Jon, I am also looking something very similar. I want to use hardware performance counters inside dtrace. Could you provide me some pointers if this could be done. Thanks, Neelam -- This message posted from opensolaris.org
Hi Neelam,>I am also looking something very similar. I want to use hardware performance counters inside dtrace. Could you provide me some pointers if this could be done. > >The CPC provider I''m been working on is taking shape, albeit slowly. I hope to have some archives ready for around the Christmas period for interested parties to take for a test drive. I''ve actually had it working for a long time but it''s undergoing some re-structuring and augmentation at the minute so it''s not quite ready for an outing in its current form. When it''s ready I''ll send something out to the list. Jon.