mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 19:26:25 +00:00
perf stat: Remove dead code
Remove dead code and do some code alignment. Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> LKML-Reference: <1245847774.2681.2.camel@ht.satnam> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
c14dab5c07
commit
3d63259583
1 changed files with 15 additions and 33 deletions
|
@ -59,42 +59,27 @@ static struct perf_counter_attr default_attrs[MAX_COUNTERS] = {
|
|||
|
||||
};
|
||||
|
||||
static int system_wide = 0;
|
||||
static int inherit = 1;
|
||||
static int verbose = 0;
|
||||
|
||||
static int fd[MAX_NR_CPUS][MAX_COUNTERS];
|
||||
|
||||
static int target_pid = -1;
|
||||
static int nr_cpus = 0;
|
||||
static unsigned int page_size;
|
||||
|
||||
static int scale = 1;
|
||||
|
||||
static const unsigned int default_count[] = {
|
||||
1000000,
|
||||
1000000,
|
||||
10000,
|
||||
10000,
|
||||
1000000,
|
||||
10000,
|
||||
};
|
||||
|
||||
#define MAX_RUN 100
|
||||
|
||||
static int run_count = 1;
|
||||
static int system_wide = 0;
|
||||
static int verbose = 0;
|
||||
static int nr_cpus = 0;
|
||||
static int run_idx = 0;
|
||||
|
||||
static u64 event_res[MAX_RUN][MAX_COUNTERS][3];
|
||||
static u64 event_scaled[MAX_RUN][MAX_COUNTERS];
|
||||
|
||||
//static u64 event_hist[MAX_RUN][MAX_COUNTERS][3];
|
||||
static int run_count = 1;
|
||||
static int inherit = 1;
|
||||
static int scale = 1;
|
||||
static int target_pid = -1;
|
||||
|
||||
static int fd[MAX_NR_CPUS][MAX_COUNTERS];
|
||||
|
||||
static u64 runtime_nsecs[MAX_RUN];
|
||||
static u64 walltime_nsecs[MAX_RUN];
|
||||
static u64 runtime_cycles[MAX_RUN];
|
||||
|
||||
static u64 event_res[MAX_RUN][MAX_COUNTERS][3];
|
||||
static u64 event_scaled[MAX_RUN][MAX_COUNTERS];
|
||||
|
||||
static u64 event_res_avg[MAX_COUNTERS][3];
|
||||
static u64 event_res_noise[MAX_COUNTERS][3];
|
||||
|
||||
|
@ -109,7 +94,6 @@ static u64 walltime_nsecs_noise;
|
|||
static u64 runtime_cycles_avg;
|
||||
static u64 runtime_cycles_noise;
|
||||
|
||||
|
||||
#define ERR_PERF_OPEN \
|
||||
"Error: counter %d, sys_perf_counter_open() syscall returned with %d (%s)\n"
|
||||
|
||||
|
@ -484,8 +468,6 @@ int cmd_stat(int argc, const char **argv, const char *prefix)
|
|||
{
|
||||
int status;
|
||||
|
||||
page_size = sysconf(_SC_PAGE_SIZE);
|
||||
|
||||
memcpy(attrs, default_attrs, sizeof(attrs));
|
||||
|
||||
argc = parse_options(argc, argv, options, stat_usage, 0);
|
||||
|
|
Loading…
Reference in a new issue