Hello Pradeep, Sorry for late reply (travel + vacation).
On Wed, Aug 6, 2008 at 8:34 AM, Pradeep Rao <[EMAIL PROTECTED]> wrote: > > I'm trying to capture event count history (length==1) for each event set by > creating an additional variable u64 oldval; in struct pfm_pmd; (kernel source) > Not sure why you need that? > I then tried doing this in two ways: > 1. record pmds[i].value into oldval before event is switched out in > pfm_save_pmds (perfmon_ctxsw.c) > i.e. > set->pmds[i].oldval = set->pmds[i].value; > set->pmds[i].value = val; > > 2. just after event is switched in, in pfm_arch_restore_pmds (perfmon.c) > I record set->pmds[i].value into oldval before set->pmds[i].value = val; for > the > new set. > There are other places where pmds[].value is updated, e.g., interrupt handler, __pfm_write_pmds(). That may be your problem for oldval. > However, both these approaches dont work. I observe the difference in > pfm_switch_sets(..) just after pfm_save_pmds() and in the first case > oldval=value (diff=0) and in the second oldval=0 (diff=val). How do you observe the difference. If you've just updated oldval, in pfm_save_pmds(), then it is not surprising that the difference is 0. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ perfmon2-devel mailing list perfmon2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perfmon2-devel