diff options
author | jistone <jistone> | 2007-09-11 16:22:18 +0000 |
---|---|---|
committer | jistone <jistone> | 2007-09-11 16:22:18 +0000 |
commit | eb66106a6c5fdfdd4b0ea3c93555f70b41063bd7 (patch) | |
tree | 8b2ec1afe5c8a7714d3efc3489bd141660e0a627 | |
parent | ce82316f2ead7a940fc4b299db4f81ba2227d6c7 (diff) | |
download | systemtap-steved-eb66106a6c5fdfdd4b0ea3c93555f70b41063bd7.tar.gz systemtap-steved-eb66106a6c5fdfdd4b0ea3c93555f70b41063bd7.tar.xz systemtap-steved-eb66106a6c5fdfdd4b0ea3c93555f70b41063bd7.zip |
2007-09-11 Josh Stone <joshua.i.stone@intel.com>
* systemtap.maps/pmap_agg_overflow.stp: Ensure that the percpu arrays
don't overflow before we get the chance to test aggregation overflow.
Also use a more optimal overflow limit (MAXMAPENTRIES + 1).
-rw-r--r-- | testsuite/ChangeLog | 6 | ||||
-rwxr-xr-x | testsuite/systemtap.maps/pmap_agg_overflow.stp | 14 |
2 files changed, 16 insertions, 4 deletions
diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog index 118bfee8..ca17ed17 100644 --- a/testsuite/ChangeLog +++ b/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2007-09-11 Josh Stone <joshua.i.stone@intel.com> + + * systemtap.maps/pmap_agg_overflow.stp: Ensure that the percpu arrays + don't overflow before we get the chance to test aggregation overflow. + Also use a more optimal overflow limit (MAXMAPENTRIES + 1). + 2007-09-10 Wenji Huang <wenji.huang@oracle.com> * systemtap.stress/current.stp: Make module probe optional. diff --git a/testsuite/systemtap.maps/pmap_agg_overflow.stp b/testsuite/systemtap.maps/pmap_agg_overflow.stp index aa54c6a9..314cf13b 100755 --- a/testsuite/systemtap.maps/pmap_agg_overflow.stp +++ b/testsuite/systemtap.maps/pmap_agg_overflow.stp @@ -1,20 +1,26 @@ # try to induce overflow of pmap aggregation # (this will only work on smp machines) -global stat, count, max_count +global stat, count, pcpu_count, max_count probe begin { if (num_online_cpus() < 2) { warn("This test only applies to smp systems...") exit() } - max_count = num_online_cpus() * max_map_entries() + max_count = max_map_entries() + 1 } probe kernel.function("scheduler_tick") { + # Be sure not to overflow the percpu array + if (++pcpu_count[cpu()] > max_map_entries()) + next + i = ++count - if (i >= max_count) exit() - stat[i] <<< i + if (i <= max_count) + stat[i] <<< i + else + exit() } probe end { |