From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org,
Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Alexis Berlemont <alexis.berlemont@gmail.com>,
Madhavan Srinivasan <maddy@linux.vnet.ibm.com>,
Michael Ellerman <mpe@ellerman.id.au>,
"Naveen N . Rao" <naveen.n.rao@linux.vnet.ibm.com>,
Peter Zijlstra <peterz@infradead.org>,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 01/20] perf probe: Change MAX_CMDLEN
Date: Fri, 24 Mar 2017 11:57:12 -0300 [thread overview]
Message-ID: <20170324145731.29350-2-acme@kernel.org> (raw)
In-Reply-To: <20170324145731.29350-1-acme@kernel.org>
From: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
There are many SDT markers in powerpc whose uprobe definition goes
beyond current MAX_CMDLEN, especially when target filename is long and
sdt marker has long list of arguments. For example, definition of sdt
marker
method__compile__end: 8@17 8@9 8@10 -4@8 8@7 -4@6 8@5 -4@4 1@37(28)
from file
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.91-2.b14.fc22.ppc64/jre/lib/ppc64/server/libjvm.so
is
p:sdt_hotspot/method__compile__end /usr/lib/jvm/java-1.8.0-openjdk-\
1.8.0.91-2.b14.fc22.ppc64/jre/lib/ppc64/server/libjvm.so:0x4c4e00\
arg1=%gpr17:u64 arg2=%gpr9:u64 arg3=%gpr10:u64 arg4=%gpr8:s32\
arg5=%gpr7:u64 arg6=%gpr6:s32 arg7=%gpr5:u64 arg8=%gpr4:s32\
arg9=+37(%gpr28):u8
'perf probe' fails with segfault for such markers. As the uprobe_events
file accepts definitions up to 4094 characters(4096 - 2 (\n\0)),
increase value of MAX_CMDLEN match that.
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexis Berlemont <alexis.berlemont@gmail.com>
Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20170207054547.3690-1-ravi.bangoria@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/probe-event.c | 1 -
tools/perf/util/probe-file.c | 3 ++-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index 6740d6812691..e4b889444447 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -47,7 +47,6 @@
#include "probe-file.h"
#include "session.h"
-#define MAX_CMDLEN 256
#define PERFPROBE_GROUP "probe"
bool probe_event_dry_run; /* Dry run flag */
diff --git a/tools/perf/util/probe-file.c b/tools/perf/util/probe-file.c
index 1542cd0d6799..c3c287125be5 100644
--- a/tools/perf/util/probe-file.c
+++ b/tools/perf/util/probe-file.c
@@ -28,7 +28,8 @@
#include "probe-file.h"
#include "session.h"
-#define MAX_CMDLEN 256
+/* 4096 - 2 ('\n' + '\0') */
+#define MAX_CMDLEN 4094
static void print_open_warning(int err, bool uprobe)
{
--
2.9.3
next prev parent reply other threads:[~2017-03-24 15:57 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-24 14:57 [GIT PULL 00/20] perf/core improvements and fixes Arnaldo Carvalho de Melo
2017-03-24 14:57 ` Arnaldo Carvalho de Melo [this message]
2017-03-24 14:57 ` [PATCH 02/20] perf probe: Return errno when not hitting any event Arnaldo Carvalho de Melo
2017-03-24 14:57 ` [PATCH 03/20] perf sdt: Add scanning of sdt probes arguments Arnaldo Carvalho de Melo
2017-03-24 14:57 ` [PATCH 04/20] perf probe: Add sdt probes arguments into the uprobe cmd string Arnaldo Carvalho de Melo
2017-03-24 14:57 ` [PATCH 05/20] perf sdt x86: Add renaming logic for rNN and other registers Arnaldo Carvalho de Melo
2017-03-24 14:57 ` [PATCH 06/20] perf annotate: More exactly grep -v of the objdump command Arnaldo Carvalho de Melo
2017-03-24 14:57 ` [PATCH 07/20] perf annotate: Add comment clarifying how the source code line is parsed Arnaldo Carvalho de Melo
2017-03-24 14:57 ` [PATCH 08/20] perf stat: Factor out callback for collecting event values Arnaldo Carvalho de Melo
2017-03-24 14:57 ` [PATCH 09/20] perf stat: Collapse identically named events Arnaldo Carvalho de Melo
2017-03-24 14:57 ` [PATCH 10/20] perf stat: Handle partially bad results with merging Arnaldo Carvalho de Melo
2017-03-24 14:57 ` [PATCH 11/20] perf tools: Factor out PMU matching in parser Arnaldo Carvalho de Melo
2017-03-24 14:57 ` [PATCH 12/20] perf pmu: Expand PMU events by prefix match Arnaldo Carvalho de Melo
2017-03-24 14:57 ` [PATCH 13/20] perf pmu: Special case uncore_ prefix Arnaldo Carvalho de Melo
2017-03-24 14:57 ` [PATCH 14/20] perf tools: Add a simple expression parser for JSON Arnaldo Carvalho de Melo
2017-03-24 14:57 ` [PATCH 15/20] perf vendor events intel: Update Intel uncore JSON event files Arnaldo Carvalho de Melo
2017-03-24 14:57 ` [PATCH 16/20] perf pmu: Support MetricExpr header in JSON event list Arnaldo Carvalho de Melo
2017-03-24 14:57 ` [PATCH 17/20] perf stat: Output JSON MetricExpr metric Arnaldo Carvalho de Melo
2017-03-24 14:57 ` [PATCH 18/20] perf list: Support printing MetricExpr with --debug Arnaldo Carvalho de Melo
2017-03-24 14:57 ` [PATCH 19/20] perf pmu: Add support for MetricName JSON attribute Arnaldo Carvalho de Melo
2017-03-24 14:57 ` [PATCH 20/20] perf list: Move extra details printing to new option Arnaldo Carvalho de Melo
2017-03-24 18:39 ` [GIT PULL 00/20] perf/core improvements and fixes Ingo Molnar
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=20170324145731.29350-2-acme@kernel.org \
--to=acme@kernel.org \
--cc=acme@redhat.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=alexis.berlemont@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maddy@linux.vnet.ibm.com \
--cc=mingo@kernel.org \
--cc=mpe@ellerman.id.au \
--cc=naveen.n.rao@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=ravi.bangoria@linux.vnet.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).