From: Philippe E. <ph...@us...> - 2003-04-05 18:26:14
|
Update of /cvsroot/oprofile/oprofile/libop In directory sc8-pr-cvs1:/tmp/cvs-serv27475/libop Modified Files: op_events.c op_events.h Log Message: validate count agaisnt min count fixing #715923 regards, Phil Index: op_events.c =================================================================== RCS file: /cvsroot/oprofile/oprofile/libop/op_events.c,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- op_events.c 15 Mar 2003 20:34:15 -0000 1.35 +++ op_events.c 5 Apr 2003 18:26:11 -0000 1.36 @@ -475,3 +475,14 @@ return ret; } + +unsigned int op_min_count(u8 ctr_type, op_cpu cpu_type) +{ + struct op_event * event; + + load_events(cpu_type); + + event = find_event(ctr_type); + + return event ? event->min_count : 0; +} Index: op_events.h =================================================================== RCS file: /cvsroot/oprofile/oprofile/libop/op_events.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- op_events.h 15 Mar 2003 16:31:23 -0000 1.15 +++ op_events.h 5 Apr 2003 18:26:11 -0000 1.16 @@ -89,6 +89,16 @@ int op_check_events(int ctr, u8 event, u16 um, op_cpu cpu_type); /** + * op_min_count - get the minimum count value. + * @param ctr_type event value + * @param cpu_type cpu type + * + * The function returns > 0 if the event is found + * 0 otherwise + */ +unsigned int op_min_count(u8 ctr_type, op_cpu cpu_type); + +/** * free memory used by any call to above function. Need to be called only once */ void op_free_events(void); |