Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932096AbbFMBPU (ORCPT ); Fri, 12 Jun 2015 21:15:20 -0400 Received: from [133.145.228.42] ([133.145.228.42]:44663 "EHLO mail7.hitachi.co.jp" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1751330AbbFMBPS (ORCPT ); Fri, 12 Jun 2015 21:15:18 -0400 Message-ID: <557B840A.4040802@hitachi.com> Date: Sat, 13 Jun 2015 10:14:50 +0900 From: Masami Hiramatsu Organization: Hitachi, Ltd., Japan User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Arnaldo Carvalho de Melo CC: Naohiro Aota , Peter Zijlstra , Linux Kernel Mailing List , David Ahern , namhyung@kernel.org, Jiri Olsa , Ingo Molnar Subject: Re: [PATCH perf/core 1/4] [BUGFIX] perf probe: List probes in stdout References: <20150612050806.20548.12371.stgit@localhost.localdomain> <20150612050813.20548.16385.stgit@localhost.localdomain> <20150612191200.GB6850@kernel.org> In-Reply-To: <20150612191200.GB6850@kernel.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2089 Lines: 62 On 2015/06/13 4:12, Arnaldo Carvalho de Melo wrote: > Em Fri, Jun 12, 2015 at 02:08:13PM +0900, Masami Hiramatsu escreveu: >> Since commit 5e17b28f1e24 ("perf probe: Add --quiet option to >> suppress output result message") have replaced printf with pr_info, >> perf probe -l outputs its result in stderr. However, that is not >> what the commit expected. >> e.g. >> ----- >> # perf probe -l > /dev/null >> probe:vfs_read (on vfs_read@ksrc/linux-3/fs/read_write.c) >> ----- >> With this fix, >> ----- >> # perf probe -l > list >> # cat list >> probe:vfs_read (on vfs_read@ksrc/linux-3/fs/read_write.c) > > Nope, with this fix just applied: Oops, I missed to rewrite... [...] >> @@ -2200,9 +2220,10 @@ static int __show_perf_probe_events(int fd, bool is_kprobe, >> goto next; >> ret = convert_to_perf_probe_event(&tev, &pev, >> is_kprobe); >> - if (ret >= 0) >> - ret = show_perf_probe_event(&pev, >> - tev.point.module); >> + if (ret < 0) >> + goto next; >> + ret = show_perf_probe_event(&pev, tev.point.module, >> + false); >> } >> next: >> clear_perf_probe_event(&pev); >> @@ -2463,7 +2484,7 @@ static int __add_probe_trace_events(struct perf_probe_event *pev, >> group = pev->group; >> pev->event = tev->event; >> pev->group = tev->group; >> - show_perf_probe_event(pev, tev->point.module); >> + show_perf_probe_event(pev, tev->point.module, true); >> /* Trick here - restore current event/group */ >> pev->event = (char *)event; >> pev->group = (char *)group; >> > These true/false are opposite! -- Masami HIRAMATSU Linux Technology Research Center, System Productivity Research Dept. Center for Technology Innovation - Systems Engineering Hitachi, Ltd., Research & Development Group E-mail: masami.hiramatsu.pt@hitachi.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/