All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>, Thomas Gleixner <tglx@linutronix.de>
Cc: Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	Clark Williams <williams@redhat.com>,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	Adrian Hunter <adrian.hunter@intel.com>,
	Jiri Olsa <jolsa@redhat.com>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 4/6] perf inject: Fix processing of ID index for injected instruction tracing
Date: Thu,  5 Dec 2019 16:32:22 -0300	[thread overview]
Message-ID: <20191205193224.24629-5-acme@kernel.org> (raw)
In-Reply-To: <20191205193224.24629-1-acme@kernel.org>

From: Adrian Hunter <adrian.hunter@intel.com>

The ID index event is used when decoding, but can result in the
following error:

 $ perf record --aux-sample -e '{intel_pt//,branch-misses}:u' ls
 $ perf inject -i perf.data -o perf.data.inj --itrace=be
 $ perf script -i perf.data.inj
 0x1020 [0x410]: failed to process type: 69 [No such file or directory]

Fix by having 'perf inject' drop the ID index event.

Fixes: c0a6de06c446 ("perf record: Add support for AUX area sampling")
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lore.kernel.org/lkml/20191204120800.8138-1-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-inject.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c
index 9664a72a089d..7e124a7b8bfd 100644
--- a/tools/perf/builtin-inject.c
+++ b/tools/perf/builtin-inject.c
@@ -403,17 +403,6 @@ static int perf_event__repipe_tracing_data(struct perf_session *session,
 	return err;
 }
 
-static int perf_event__repipe_id_index(struct perf_session *session,
-				       union perf_event *event)
-{
-	int err;
-
-	perf_event__repipe_synth(session->tool, event);
-	err = perf_event__process_id_index(session, event);
-
-	return err;
-}
-
 static int dso__read_build_id(struct dso *dso)
 {
 	if (dso->has_build_id)
@@ -651,7 +640,7 @@ static int __cmd_inject(struct perf_inject *inject)
 		inject->tool.comm	    = perf_event__repipe_comm;
 		inject->tool.namespaces	    = perf_event__repipe_namespaces;
 		inject->tool.exit	    = perf_event__repipe_exit;
-		inject->tool.id_index	    = perf_event__repipe_id_index;
+		inject->tool.id_index	    = perf_event__process_id_index;
 		inject->tool.auxtrace_info  = perf_event__process_auxtrace_info;
 		inject->tool.auxtrace	    = perf_event__process_auxtrace;
 		inject->tool.aux	    = perf_event__drop_aux;
-- 
2.21.0


  parent reply	other threads:[~2019-12-05 19:33 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-05 19:32 [GIT PULL 0/6] perf/urgent fixes Arnaldo Carvalho de Melo
2019-12-05 19:32 ` [PATCH 1/6] perf report/top TUI: Replace pr_err() with ui__error() Arnaldo Carvalho de Melo
2019-12-05 19:32 ` [PATCH 2/6] perf report: Make -F more strict like -s Arnaldo Carvalho de Melo
2019-12-05 19:32 ` [PATCH 3/6] perf report: Bail out --mem-mode if mem info is not available Arnaldo Carvalho de Melo
2019-12-05 19:32 ` Arnaldo Carvalho de Melo [this message]
2019-12-05 19:32 ` [PATCH 5/6] tools headers UAPI: Sync drm/i915_drm.h with the kernel sources Arnaldo Carvalho de Melo
2019-12-05 19:32 ` [PATCH 6/6] tools headers UAPI: Update tools's copy of drm.h headers Arnaldo Carvalho de Melo
2019-12-06  7:57 ` [GIT PULL 0/6] perf/urgent fixes Ingo Molnar
2019-12-06 14:24   ` Arnaldo Carvalho de Melo
2019-12-06 14:25   ` Jiri Olsa
2019-12-06 14:43     ` Arnaldo Carvalho de Melo
2019-12-06 15:04       ` Jiri Olsa
2019-12-06 15:35         ` Arnaldo Carvalho de Melo
2020-01-12 19:22           ` [PATCH] perf tools: Use %define api.pure full instead of %pure-parser Jiri Olsa
2020-01-20  8:27             ` [tip: perf/core] " tip-bot2 for Jiri Olsa
2020-01-13  8:28 ` [GIT PULL 0/6] perf/urgent fixes Ravi Bangoria
2020-01-13  9:25   ` Jiri Olsa
2020-01-13  9:44     ` Ravi Bangoria

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191205193224.24629-5-acme@kernel.org \
    --to=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=jolsa@kernel.org \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=williams@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.