perf auxtrace: Add machine_pid and vcpu to auxtrace_error

Add machine_pid and vcpu to struct perf_record_auxtrace_error. The existing
fmt member is used to identify the new format.

The new members make it possible to easily differentiate errors from guest
machines.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: kvm@vger.kernel.org
Link: https://lore.kernel.org/r/20220711093218.10967-18-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Adrian Hunter
2022-07-11 12:32:00 +03:00
committed by Arnaldo Carvalho de Melo
parent 2273e46b98
commit 7151c1d178
5 changed files with 37 additions and 7 deletions

View File

@ -1559,7 +1559,7 @@ static void python_process_auxtrace_error(struct perf_session *session __maybe_u
msg = (const char *)&e->time;
}
t = tuple_new(9);
t = tuple_new(11);
tuple_set_u32(t, 0, e->type);
tuple_set_u32(t, 1, e->code);
@ -1570,6 +1570,8 @@ static void python_process_auxtrace_error(struct perf_session *session __maybe_u
tuple_set_u64(t, 6, tm);
tuple_set_string(t, 7, msg);
tuple_set_u32(t, 8, cpumode);
tuple_set_s32(t, 9, e->machine_pid);
tuple_set_s32(t, 10, e->vcpu);
call_object(handler, t, handler_name);