Skip to content

Commit

Permalink
perf_counter tools: increase limits, fix
Browse files Browse the repository at this point in the history
NR_CPUS and NR_COUNTERS goes up quadratic ... 1024x4096 was far
too ambitious upper limit - go for 256x256 which is still plenty.

[ Impact: reduce perf tool memory consumption ]

Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: John Kacur <jkacur@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Ingo Molnar committed May 25, 2009
1 parent a3862d3 commit 85a9f92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Documentation/perf_counter/perf.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ sys_perf_counter_open(struct perf_counter_hw_event *hw_event_uptr,
group_fd, flags);
}

#define MAX_COUNTERS 1024
#define MAX_NR_CPUS 4096
#define MAX_COUNTERS 256
#define MAX_NR_CPUS 256

#define EID(type, id) (((__u64)(type) << PERF_COUNTER_TYPE_SHIFT) | (id))

Expand Down

0 comments on commit 85a9f92

Please sign in to comment.