From: <no...@so...> - 2002-11-01 20:31:20
|
Bugs item #615087, was opened at 2002-09-26 19:39 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=116191&aid=615087&group_id=16191 Category: None Group: None Status: Open >Resolution: Fixed Priority: 5 Submitted By: Bob Montgomery (mudbone) Assigned to: Nobody/Anonymous (nobody) Summary: Samples with count=0 waste buffer space Initial Comment: dump_one creates leaves entries with pid and eip intact, but zeroes the count. evict_op_entry will copy anything with a non-zero eip to the buffer. In combination, they can send lots of samples to the buffer with count==0. It's probably useful for dump_one to allow the entry to retain its eip and pid to reduce future thrashing (an entry that has hits will probably get more hits after it's dumped). So I think the best way to prevent 0-hit samples in the buffer is to change the test in evict_op_entry from eip to counts. For prospect's use of oprofile (we dump every two seconds), this cut the number of 0-hit samples in half for a 1500 Hz profile of a kernel build. Something like this: diff -urN -X dontdiff oprofile/module/oprofile.c oprofile-25sep-play/module/oprofile.c --- oprofile/module/oprofile.c Thu Sep 26 11:16:45 2002 +++ oprofile-25sep-play/module/oprofile.c Thu Sep 26 11:20:33 2002 @@ -69,8 +69,8 @@ inline static void evict_op_entry(uint cpu, struct _oprof_data * data, struct op_sample const * ops, long eflags) { - /* ignore initial hash table cleanout */ - if (ops->eip == 0) + /* ignore op_samples with no hits (initial value or recently dumped) */ + if (ops->count == 0) return; memcpy(&data->buffer[data->nextbuf], ops, sizeof(struct op_sample)); ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=116191&aid=615087&group_id=16191 |