aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/s390-cpumsf.c
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2019-02-06 12:39:47 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-02-06 11:20:32 -0300
commit16bd4321c2425d37031a902cdbf183e2cd099946 (patch)
tree4c8b88ab0a04d2d9e32470bb7781300342dad8a6 /tools/perf/util/s390-cpumsf.c
parentperf intel-pt: Packet splitting can happen only on 32-bit (diff)
downloadlinux-dev-16bd4321c2425d37031a902cdbf183e2cd099946.tar.xz
linux-dev-16bd4321c2425d37031a902cdbf183e2cd099946.zip
perf auxtrace: Add timestamp to auxtrace errors
The timestamp can use useful to find part of a trace that has an error without outputting all of the trace e.g. using the itrace 's' option to skip initial number of events. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: http://lkml.kernel.org/r/20190206103947.15750-6-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/s390-cpumsf.c')
-rw-r--r--tools/perf/util/s390-cpumsf.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/perf/util/s390-cpumsf.c b/tools/perf/util/s390-cpumsf.c
index 835249c77f56..d9525d220db1 100644
--- a/tools/perf/util/s390-cpumsf.c
+++ b/tools/perf/util/s390-cpumsf.c
@@ -819,7 +819,7 @@ static int s390_cpumsf_process_queues(struct s390_cpumsf *sf, u64 timestamp)
}
static int s390_cpumsf_synth_error(struct s390_cpumsf *sf, int code, int cpu,
- pid_t pid, pid_t tid, u64 ip)
+ pid_t pid, pid_t tid, u64 ip, u64 timestamp)
{
char msg[MAX_AUXTRACE_ERROR_MSG];
union perf_event event;
@@ -827,7 +827,7 @@ static int s390_cpumsf_synth_error(struct s390_cpumsf *sf, int code, int cpu,
strncpy(msg, "Lost Auxiliary Trace Buffer", sizeof(msg) - 1);
auxtrace_synth_error(&event.auxtrace_error, PERF_AUXTRACE_ERROR_ITRACE,
- code, cpu, pid, tid, ip, msg);
+ code, cpu, pid, tid, ip, msg, timestamp);
err = perf_session__deliver_synth_event(sf->session, &event, NULL);
if (err)
@@ -839,7 +839,8 @@ static int s390_cpumsf_synth_error(struct s390_cpumsf *sf, int code, int cpu,
static int s390_cpumsf_lost(struct s390_cpumsf *sf, struct perf_sample *sample)
{
return s390_cpumsf_synth_error(sf, 1, sample->cpu,
- sample->pid, sample->tid, 0);
+ sample->pid, sample->tid, 0,
+ sample->time);
}
static int