From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757558AbdCUNsO (ORCPT ); Tue, 21 Mar 2017 09:48:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35130 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756964AbdCUNrq (ORCPT ); Tue, 21 Mar 2017 09:47:46 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com B005C7AE83 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=acme@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com B005C7AE83 Date: Tue, 21 Mar 2017 10:37:54 -0300 From: Arnaldo Carvalho de Melo To: Masami Hiramatsu Cc: Ravi Bangoria , linux-kernel@vger.kernel.org, alexis.berlemont@gmail.com, peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, mpe@ellerman.id.au, naveen.n.rao@linux.vnet.ibm.com, maddy@linux.vnet.ibm.com Subject: Re: [PATCH v2] perf/probe: Change MAX_CMDLEN Message-ID: <20170321133754.GA2531@redhat.com> References: <20170207104041.aebc2eb9ad4a6dd01f8a0f5c@kernel.org> <20170207054547.3690-1-ravi.bangoria@linux.vnet.ibm.com> <20170321141950.3dbd5ba41f660450ea9e0d71@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170321141950.3dbd5ba41f660450ea9e0d71@kernel.org> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.20 (2009-12-10) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 21 Mar 2017 13:37:54 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Tue, Mar 21, 2017 at 02:19:50PM +0900, Masami Hiramatsu escreveu: > On Tue, 7 Feb 2017 11:15:47 +0530 > Ravi Bangoria wrote: > > > 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 seg fault for such markers. As uprobe_events file > > accepts definition upto 4094 characters(4096 - 2 (\n\0)), increase value > > of MAX_CMDLEN to 4094. > > This looks good to me. > > Acked-by: Masami Hiramatsu Thanks, applied manually, as the code patched drifted some lines away from the ones here. - Arnaldo > Thanks, > > > > > Signed-off-by: Ravi Bangoria > > --- > > Changes in v2: > > - Set MAX_CMDLEN to 4094 instead of 512 > > > > 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 6a6f44d..e6e3244 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 38eca3c..fdabe7e 100644 > > --- a/tools/perf/util/probe-file.c > > +++ b/tools/perf/util/probe-file.c > > @@ -29,7 +29,8 @@ > > #include "session.h" > > #include "perf_regs.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 > > > > > -- > Masami Hiramatsu