Daniel, I assume you have changed busyloop() or reset notification_received, otherwise the function will return immediately because notification_received will already be 3.
void busyloop(void) { /* * busy loop to burn CPU cycles */ for(;notification_received < 3;) ; } On Tue, Apr 28, 2009 at 3:42 PM, Daniel Thomas <dtho...@sgi.com> wrote: > Hi Stephane, > > > > Forgive me if I understood wrongly but if I run the example_v2.x/notify_self > example on > > my suse11 Nehalem system I get this: > > ./notify_self > > [FIXED_CTRL(pmc16)=0xaa pmi0=1 en0=0x2 any0=0 pmi1=1 en1=0x2 any1=0 pmi2=1 > en2=0x0 any2=0] INSTRUCTIONS_RETIRED UNHALTED_CORE_CYCLES > > [FIXED_CTR0(pmd16)] > > [FIXED_CTR1(pmd17)] > > Notification 1: 1497911503 INSTRUCTIONS_RETIRED ip=0x4015a0 > > Notification 2: 1497711364 INSTRUCTIONS_RETIRED ip=0x4015a0 > > Notification 3: 1497964013 INSTRUCTIONS_RETIRED ip=0x4015a0 > > > > > > Now if instead of: > > pfm_self_start(ctx_fd); > > busyloop(); > > pfm_self_stop(ctx_fd); > > I run > > > > pfm_self_start(ctx_fd); > > busyloop(); > > pfm_self_stop(ctx_fd); > > printf("Run with counting stopped\n"); > > busyloop(); > > printf("Run again with counting started\n"); > > pfm_self_start(ctx_fd); > > busyloop(); > > pfm_self_stop(ctx_fd); > > > > I get: > > ./notify_self > > [FIXED_CTRL(pmc16)=0xaa pmi0=1 en0=0x2 any0=0 pmi1=1 en1=0x2 any1=0 pmi2=1 > en2=0x0 any2=0] INSTRUCTIONS_RETIRED UNHALTED_CORE_CYCLES > > [FIXED_CTR0(pmd16)] > > [FIXED_CTR1(pmd17)] > > Notification 1: 1498758725 INSTRUCTIONS_RETIRED ip=0x4015e7 > > Notification 2: 1499513234 INSTRUCTIONS_RETIRED ip=0x4015e7 > > Notification 3: 1499545827 INSTRUCTIONS_RETIRED ip=0x4015e0 > > Run with counting stopped > > Run again with counting started > > > > I was expecting to get another set of notifications after: > > "Run again with counting started" > > > > so either: > > -This is not the right way stop/resume counting. If so please > let me know what to do > > -There is something wrong in the perfmon behavior on this system > > > > Thanks, > > > > Daniel Thomas. > > ------------------------------------------------------------------------------ > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > _______________________________________________ > perfmon2-devel mailing list > perfmon2-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/perfmon2-devel > > ------------------------------------------------------------------------------ Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf _______________________________________________ perfmon2-devel mailing list perfmon2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perfmon2-devel