The patch titled oprofile: ppro: need to enable/disable all the counters has been added to the -mm tree. Its filename is oprofile-ppro-need-to-enable-disable-all-the-counters.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: oprofile: ppro: need to enable/disable all the counters From: Arun Sharma <arun.sharma@xxxxxxxxxx> Need to enable/disable all the counters instead of just counter 0. This affects all cpus with family=6, including i386/core. Usual symptom: only counter 0 provides samples. Other counters don't produce samples. Signed-off-by: Arun Sharma <arun.sharma@xxxxxxxxxx> Cc: Philippe Elie <phil.el@xxxxxxxxxx> Cc: John Levon <levon@xxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- diff -puN arch/i386/oprofile/op_model_ppro.c~oprofile-ppro-need-to-enable-disable-all-the-counters arch/i386/oprofile/op_model_ppro.c --- a/arch/i386/oprofile/op_model_ppro.c~oprofile-ppro-need-to-enable-disable-all-the-counters +++ a/arch/i386/oprofile/op_model_ppro.c @@ -138,11 +138,14 @@ static int ppro_check_ctrs(struct pt_reg static void ppro_start(struct op_msrs const * const msrs) { unsigned int low,high; + int i; - if (reset_value[0]) { - CTRL_READ(low, high, msrs, 0); - CTRL_SET_ACTIVE(low); - CTRL_WRITE(low, high, msrs, 0); + for (i = 0; i < NUM_COUNTERS; ++i) { + if (reset_value[i]) { + CTRL_READ(low, high, msrs, i); + CTRL_SET_ACTIVE(low); + CTRL_WRITE(low, high, msrs, i); + } } } @@ -150,11 +153,14 @@ static void ppro_start(struct op_msrs co static void ppro_stop(struct op_msrs const * const msrs) { unsigned int low,high; + int i; - if (reset_value[0]) { - CTRL_READ(low, high, msrs, 0); + for (i = 0; i < NUM_COUNTERS; ++i) { + if (!reset_value[i]) + continue; + CTRL_READ(low, high, msrs, i); CTRL_SET_INACTIVE(low); - CTRL_WRITE(low, high, msrs, 0); + CTRL_WRITE(low, high, msrs, i); } } _ Patches currently in -mm which might be from arun.sharma@xxxxxxxxxx are oprofile-ppro-need-to-enable-disable-all-the-counters.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html