forked from Minki/linux
perf sched: Make struct perf_sched sched a local variable
Change "struct perf_sched sched" from being global to being local.
The build slowdown cured by f36f83f947
is dealt with in the following
patch, by programatically setting perf_sched.curr_pid.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: David Ahern <dsahern@gmail.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1382427258-17495-12-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
4157922a90
commit
8a39df8faa
@ -1655,8 +1655,10 @@ static int __cmd_record(int argc, const char **argv)
|
|||||||
return cmd_record(i, rec_argv, NULL);
|
return cmd_record(i, rec_argv, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char default_sort_order[] = "avg, max, switch, runtime";
|
int cmd_sched(int argc, const char **argv, const char *prefix __maybe_unused)
|
||||||
static struct perf_sched sched = {
|
{
|
||||||
|
const char default_sort_order[] = "avg, max, switch, runtime";
|
||||||
|
struct perf_sched sched = {
|
||||||
.tool = {
|
.tool = {
|
||||||
.sample = perf_sched__process_tracepoint_sample,
|
.sample = perf_sched__process_tracepoint_sample,
|
||||||
.comm = perf_event__process_comm,
|
.comm = perf_event__process_comm,
|
||||||
@ -1674,10 +1676,7 @@ static struct perf_sched sched = {
|
|||||||
.profile_cpu = -1,
|
.profile_cpu = -1,
|
||||||
.next_shortname1 = 'A',
|
.next_shortname1 = 'A',
|
||||||
.next_shortname2 = '0',
|
.next_shortname2 = '0',
|
||||||
};
|
};
|
||||||
|
|
||||||
int cmd_sched(int argc, const char **argv, const char *prefix __maybe_unused)
|
|
||||||
{
|
|
||||||
const struct option latency_options[] = {
|
const struct option latency_options[] = {
|
||||||
OPT_STRING('s', "sort", &sched.sort_order, "key[,key2...]",
|
OPT_STRING('s', "sort", &sched.sort_order, "key[,key2...]",
|
||||||
"sort by key(s): runtime, switch, avg, max"),
|
"sort by key(s): runtime, switch, avg, max"),
|
||||||
|
Loading…
Reference in New Issue
Block a user