diff options
author | Arnaldo Carvalho de Melo <[email protected]> | 2015-09-09 12:25:00 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2015-09-14 12:50:29 -0300 |
commit | 4cde998d205894705b534878122631142a3eefe4 (patch) | |
tree | 707d60ab80953e31d045bd66bcad600dac2ac90a /tools/perf/util/trace-event-scripting.c | |
parent | aa36ddd7afbb0a3db216c1391e28cd6d80ed1706 (diff) |
perf machine: Add pointer to sample's environment
The 'struct machine' represents the machine where the samples were/are
being collected, and we also have a 'struct perf_env' with extra details
about such machine, that we were collecting at 'perf.data' creation time
but we also needed when no perf.data file is being used, such as in
'perf top'.
So, get those structs closer together, as they provide a bigger picture
of the sample's environment.
In 'perf session', when the file argument is NULL, we can assume that
the tool is sampling the running machine, so point machine->env to
the global put in place in previous patches, while set it to the
perf_header.env one when reading from a file.
This paves the way for machine->env to be used in
perf_event__preprocess_sample to populate addr_location.socket.
Tested-by: Wang Nan <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Kan Liang <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Stephane Eranian <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions