diff options
author | Jiri Olsa <jolsa@kernel.org> | 2018-03-07 16:50:04 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-03-08 11:30:42 -0300 |
commit | 20a8a3cf90215cebd916048e51a5bfa6c3707778 (patch) | |
tree | 6318c000d0b7b938bdc84c0b5832cdfd1a89a518 /tools/perf/builtin-record.c | |
parent | e971a5a8399a5e84164239a5c2d59b8a51314241 (diff) | |
download | linux-20a8a3cf90215cebd916048e51a5bfa6c3707778.tar.bz2 |
perf record: Move machine variable down the function
It's used far more down to be declared on the top of the __cmd_record.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20180307155020.32613-4-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-record.c')
-rw-r--r-- | tools/perf/builtin-record.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 753ffcecf254..31d4d70e2f6a 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -854,7 +854,6 @@ static int __cmd_record(struct record *rec, int argc, const char **argv) int status = 0; unsigned long waking = 0; const bool forks = argc > 0; - struct machine *machine; struct perf_tool *tool = &rec->tool; struct record_opts *opts = &rec->opts; struct perf_data *data = &rec->data; @@ -959,8 +958,6 @@ static int __cmd_record(struct record *rec, int argc, const char **argv) goto out_child; } - machine = &session->machines.host; - err = record__synthesize(rec, false); if (err < 0) goto out_child; @@ -988,6 +985,7 @@ static int __cmd_record(struct record *rec, int argc, const char **argv) * Let the child rip */ if (forks) { + struct machine *machine = &session->machines.host; union perf_event *event; pid_t tgid; |