Hello, I would like to emulate Oprofile''s use of performance counters on Solaris. I was expecting to find a provider for the performance counters and get a ustack() every time a certain amount of monitored events have gone by. I would like to look at Front-Side-Bus events or cache miss events (any cache would do). The cputrack tool does not seem to do what I want (just a counter, no profiling). I guess it would work to access the performance counters in the D language and work with the periodic provider. Thanks for your help, -- Pierre-Olivier -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20070806/695a9be0/attachment.html>
Jon Haslam (DTrace developer extraordinaire) is working on a DTrace CPC provider, which will give you what you want. It''s a non-trivial amount of work to get this going, and I''m not sure when we can expect something in the NV gate. Jon, who is always listening, will likely provide an update. Thanks, /jim Pierre-Olivier Gaillard wrote:> Hello, > > I would like to emulate Oprofile''s use of performance counters on > Solaris. I was expecting to find a provider for the performance > counters and get a ustack() every time a certain amount of monitored > events have gone by. > I would like to look at Front-Side-Bus events or cache miss events > (any cache would do). > > The cputrack tool does not seem to do what I want (just a counter, no > profiling). > > I guess it would work to access the performance counters in the D > language and work with the periodic provider. > > Thanks for your help, > > -- > Pierre-Olivier > ------------------------------------------------------------------------ > > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org >
Greetings. Depending on your exact needs you might find Sun Studio''s performance analyzer to be able to do what you want. You can even try both dtrace and performance analyzer''s own sampling through the recently introduced D-Light "extension" of that beast. Though its somewhat toy implementation yet. Any comments on its usability are welcome. Hopefully that does not sound like a shameless plug ;) regards, Fedor. On Mon, 6 Aug 2007, Pierre-Olivier Gaillard wrote:> Hello, > > I would like to emulate Oprofile''s use of performance counters on Solaris. I > was expecting to find a provider for the performance counters and get a > ustack() every time a certain amount of monitored events have gone by. > I would like to look at Front-Side-Bus events or cache miss events (any > cache would do). > > The cputrack tool does not seem to do what I want (just a counter, no > profiling). > > I guess it would work to access the performance counters in the D language > and work with the periodic provider. > > Thanks for your help, > > -- > Pierre-Olivier >
Hi, This sounds like what I want and it is available on my machine. Thanks a lot. The output of collect is a bit different from what the man page on the Sun web site says. Also, the quickstart guide seems a bit sketchy. I am trying to activate the counters on a running program but I am getting an error : (dbx) collector hwprofile counter +dcw dbx: missing argument Even with the example from the man page. (dbx) collector hwprofile counter FP_dispatched_fpu_ops~umask=0x3/2,10007 dbx: missing argument I guess it must be a stupid mistake on my part, but I can''t figure it. On 8/6/07, Fedor V. Sergeev <Fedor.Sergeev at sun.com> wrote:> > Greetings. > > Depending on your exact needs you might find Sun Studio''s performance > analyzer > to be able to do what you want. > You can even try both dtrace and performance analyzer''s own sampling > through the > recently introduced D-Light "extension" of that beast. Though its somewhat > toy > implementation yet. Any comments on its usability are welcome. > > Hopefully that does not sound like a shameless plug ;) > > regards, > Fedor. > > On Mon, 6 Aug 2007, Pierre-Olivier Gaillard wrote: > > > Hello, > > > > I would like to emulate Oprofile''s use of performance counters on > Solaris. I > > was expecting to find a provider for the performance counters and get a > > ustack() every time a certain amount of monitored events have gone by. > > I would like to look at Front-Side-Bus events or cache miss events (any > > cache would do). > > > > The cputrack tool does not seem to do what I want (just a counter, no > > profiling). > > > > I guess it would work to access the performance counters in the D > language > > and work with the periodic provider. > > > > Thanks for your help, > > > > -- > > Pierre-Olivier > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20070806/d454010c/attachment.html>
Pierre-Olivier Gaillard wrote On 08/06/07 12:04,:> Hi, > > This sounds like what I want and it is available on my machine. Thanks > a lot. > The output of collect is a bit different from what the man page on the > Sun web site says. > Also, the quickstart guide seems a bit sketchy. > > I am trying to activate the counters on a running program but I am > getting an error : > (dbx) collector hwprofile counter +dcw > dbx: missing argument > Even with the example from the man page. > (dbx) collector hwprofile counter > FP_dispatched_fpu_ops~umask=0x3/2,10007 > dbx: missing argumentWhat does collect say that''s different from the man page? Each chip has different counters, so you''d certainly see that difference. You sent some dbx output, but can you tell me exactly how you got to that point? How did you invoke dbx? What was the target process? Was it already running, and you were attaching, or did you expect to launch the process from dbx? What OS version were you running? From the output, it looks like you were running on an x86/x64 chip, which means you can not do dataspace profiling (The + in front of fcs), but that shouldn''t cause the "missing argument" complaint. Marty
Wow. That''s quite a few questions. On 8/6/07, Martin.Itzkowitz at sun.com <Martin.Itzkowitz at sun.com> wrote:> > Pierre-Olivier Gaillard wrote On 08/06/07 12:04,: > > > Hi, > > > > This sounds like what I want and it is available on my machine. Thanks > > a lot. > > The output of collect is a bit different from what the man page on the > > Sun web site says. > > Also, the quickstart guide seems a bit sketchy. > > > > I am trying to activate the counters on a running program but I am > > getting an error : > > (dbx) collector hwprofile counter +dcw > > dbx: missing argument > > Even with the example from the man page. > > (dbx) collector hwprofile counter > > FP_dispatched_fpu_ops~umask=0x3/2,10007 > > dbx: missing argument > > What does collect say that''s different from the man page? Each chip has > different > counters, so you''d certainly see that difference.I see : D$ Read Misses (dcrm = DC_rd_miss/1) 200003 h=40009 D$ Write Misses (dcwm = DC_wr_miss/1) 200003 h=40009 D$ Read Refs (dcr = DC_rd/0) 1000003 h=200003 D$ Write Refs (dcw = DC_wr/0) 1000003 h=200003 Instead of : Well known HW counters available for profiling: cycles[/{0|1}],9999991 (''CPU Cycles'', alias for Cycle_cnt; CPU-cycles) insts[/{0|1}],9999991 (''Instructions Executed'', alias for Instr_cnt; events) dcrm[/1],100003 (''D$ Read Misses'', alias for DC_rd_miss; load events) ... So, it looks like the formatting has changed. You sent some dbx output, but can you tell me exactly how you got to> that point?dbx <path to my proprietary binary> 20599 How did you invoke dbx? What was the target process? Was it already The target is a running proprietary process. running, and you were attaching, or did you expect to launch the process> from dbx?I used dbx because I wanted to attach to the process. I would have use collect instead (collect +dcw ls worked). I then type in the dbx console : collector hwprofile list collector hwprofile counter +dcw What OS version were you running? From the output, it looks like you were> running on an x86/x64 chip, which means you can not do dataspace > profiling (The + in > front of fcs), but that shouldn''t cause the "missing argument" complaint.Well, not really : bash$ /usr/platform/`uname -i`/sbin/prtdiag System Configuration: Sun Microsystems sun4u Sun Fire 880 System clock frequency: 150 MHz Memory size: 32768 Megabytes ========================= CPUs ============================================== Run E$ CPU CPU Brd CPU MHz MB Impl. Mask --- ----- ---- ---- ------- ---- A 0 1200 8.0 US-III+ 11.1 bash$ uname -a SunOS bigbird 5.9 Generic_118558-26 sun4u sparc SUNW,Sun-Fire-880 bash$ dbx -V Sun WorkShop 6 update 2 Dbx Debugger 6.2 Patch 115117-02 2004/05/22 It looks to me like my environment has everything I need to ask dbx to do : I am looking forward to the dtrace provider. It seems less intrusive than attaching with dbx. Also the performance analyzer seems to be part of the developer toolkit which is unlikely to be available on a production server. This makes the DTrace providers even more valuable in my opinion. Thanks for your help, P.O. Gaillard PS: dataspace profiling sounds absolutely great. Can''t wait to try that. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20070806/44650ab4/attachment.html>
Hi Pierre-Olivier, Glad to hear that the (excellent) Studio tools will help you get what you need. Just for the record; yes, I''m working on a performance counter provider for DTrace. It''s been in the works for a while now and, for various reasons, it''s taken a lot longer than I wanted it to. At the minute I have no integration date in mind but I''m really trying to make it for later this year if at all possible.>Jon Haslam (DTrace developer extraordinaire) is working on a DTrace >CPC provider, >Jim, I promise to delete those photo''s now. They''ve more than paid for themselves ;-) . Jon.
On Mon, 6 Aug 2007, Pierre-Olivier Gaillard wrote:> SunOS bigbird 5.9 Generic_118558-26 sun4u sparc SUNW,Sun-Fire-880 > > bash$ dbx -V > Sun WorkShop 6 update 2 Dbx Debugger 6.2 Patch 115117-02 2004/05/22 > > It looks to me like my environment has everything I need to ask dbx to do :Gosh... can you, please, use something less ancient than Workshop 6u2 which is .. what .. 7 releases behind current Sun Studio 12. I bet your milage will vary greatly. regards, Fedor.> > I am looking forward to the dtrace provider. It seems less intrusive than > attaching with dbx. Also the performance analyzer seems to be part of the > developer toolkit which is unlikely to be available on a production server. > This makes the DTrace providers even more valuable in my opinion. > > Thanks for your help, > > P.O. Gaillard > > PS: dataspace profiling sounds absolutely great. Can''t wait to try that. >
You are using an ancient dbx. Use the one from Studio 12. /net/guild.sfbay/export/home1/train_src/mars/dist/sparc-S2/bin/ Marty Pierre-Olivier Gaillard wrote:> Wow. That''s quite a few questions. > > On 8/6/07, *Martin.Itzkowitz at sun.com > <mailto:Martin.Itzkowitz at sun.com>* < Martin.Itzkowitz at sun.com > <mailto:Martin.Itzkowitz at sun.com>> wrote: > > Pierre-Olivier Gaillard wrote On 08/06/07 12:04,: > > > Hi, > > > > This sounds like what I want and it is available on my machine. > Thanks > > a lot. > > The output of collect is a bit different from what the man page > on the > > Sun web site says. > > Also, the quickstart guide seems a bit sketchy. > > > > I am trying to activate the counters on a running program but I am > > getting an error : > > (dbx) collector hwprofile counter +dcw > > dbx: missing argument > > Even with the example from the man page. > > (dbx) collector hwprofile counter > > FP_dispatched_fpu_ops~umask=0x3/2,10007 > > dbx: missing argument > > What does collect say that''s different from the man page? Each > chip has > different > counters, so you''d certainly see that difference. > > > I see : > D$ Read Misses (dcrm = DC_rd_miss/1) 200003 h=40009 > D$ Write Misses (dcwm = DC_wr_miss/1) 200003 h=40009 > D$ Read Refs (dcr = DC_rd/0) 1000003 h=200003 > D$ Write Refs (dcw = DC_wr/0) 1000003 h=200003 > Instead of : > > Well known HW counters available for profiling: > cycles[/{0|1}],9999991 (''CPU Cycles'', alias for Cycle_cnt; CPU-cycles) > > insts[/{0|1}],9999991 (''Instructions Executed'', alias for Instr_cnt; events) > dcrm[/1],100003 (''D$ Read Misses'', alias for DC_rd_miss; load events) > ... > > So, it looks like the formatting has changed. > > > You sent some dbx output, but can you tell me exactly how you got to > that point? > > > dbx <path to my proprietary binary> 20599 > > How did you invoke dbx? What was the target process? Was it already > > > The target is a running proprietary process. > > running, and you were attaching, or did you expect to launch the > process > from dbx? > > > I used dbx because I wanted to attach to the process. I would > have use > collect instead (collect +dcw ls worked). > I then type in the dbx console : > collector hwprofile list > collector hwprofile counter +dcw > > What OS version were you running? From the output, it looks like > you were > running on an x86/x64 chip, which means you can not do dataspace > profiling (The + in > front of fcs), but that shouldn''t cause the "missing argument" > complaint. > > Well, not really : > bash$ /usr/platform/`uname -i`/sbin/prtdiag > System Configuration: Sun Microsystems sun4u Sun Fire 880 > System clock frequency: 150 MHz > Memory size: 32768 Megabytes > > ========================= CPUs > ==============================================> > Run E$ CPU CPU > Brd CPU MHz MB Impl. Mask > --- ----- ---- ---- ------- ---- > A 0 1200 8.0 US-III+ 11.1 > bash$ uname -a > SunOS bigbird 5.9 Generic_118558-26 sun4u sparc SUNW,Sun-Fire-880 > > bash$ dbx -V > Sun WorkShop 6 update 2 Dbx Debugger 6.2 Patch 115117-02 2004/05/22 > > It looks to me like my environment has everything I need to ask dbx to > do : > > I am looking forward to the dtrace provider. It seems less intrusive > than attaching with dbx. Also the performance analyzer seems to be > part of the developer toolkit which is unlikely to be available on a > production server. This makes the DTrace providers even more valuable > in my opinion. > > Thanks for your help, > > P.O. Gaillard > > PS: dataspace profiling sounds absolutely great. Can''t wait to try that. > > >------------------------------------------------------------------------ > >_______________________________________________ >dtrace-discuss mailing list >dtrace-discuss at opensolaris.org > >