Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752872AbbEKUbU (ORCPT ); Mon, 11 May 2015 16:31:20 -0400 Received: from mail9.hitachi.co.jp ([133.145.228.44]:54572 "EHLO mail9.hitachi.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751407AbbEKUbS (ORCPT ); Mon, 11 May 2015 16:31:18 -0400 Message-ID: <5551118F.7060101@hitachi.com> Date: Tue, 12 May 2015 05:31:11 +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: He Kuang , Ingo Molnar , a.p.zijlstra@chello.nl, jolsa@kernel.org, mingo@redhat.com, wangnan0@huawei.com, linux-kernel@vger.kernel.org Subject: Re: Re: Re: [PATCH v3 3/3] perf probe: Show better error message when failed to find variable References: <1431336304-16863-1-git-send-email-hekuang@huawei.com> <1431336304-16863-3-git-send-email-hekuang@huawei.com> <20150511093010.GA31869@gmail.com> <555079CF.40701@huawei.com> <20150511095052.GA7441@gmail.com> <55508149.8040404@huawei.com> <55509A67.1040704@hitachi.com> <20150511133527.GB28183@kernel.org> <20150511134420.GC28183@kernel.org> In-Reply-To: <20150511134420.GC28183@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: 2658 Lines: 63 On 2015/05/11 22:44, Arnaldo Carvalho de Melo wrote: > Em Mon, May 11, 2015 at 10:35:27AM -0300, Arnaldo Carvalho de Melo escreveu: >> Em Mon, May 11, 2015 at 09:02:47PM +0900, Masami Hiramatsu escreveu: >>> On 2015/05/11 19:15, He Kuang wrote: >>>> On 2015/5/11 17:50, Ingo Molnar wrote: >>>>> * He Kuang wrote: >>>>>> On 2015/5/11 17:30, Ingo Molnar wrote: >>>>>>>> After this patch: >>>>>>>> $ perf probe --add 'generic_perform_write+118 bytes' >>>>>>>> Failed to find the location of bytes at this address. >>>>>>> What does this sentence mean? I thought 'address' means 'location of >>>>>>> bytes'. So the address identifies the location and obviously we know >>>>>>> that. So this message wants to say something else. >>>>>> 'generic_perform_write' is a function name, while 'bytes' is a local >>>>>> variable in this function. Maybe the variable I chose make you confused. >> >>>>>> This maybe clear: >>>>>> Failed to find the location of 'bytes' at this address. >>>>> Yeah, absolutely! This highlights the importance of putting >>>>> user-supplied symbols into quotes and such. >> >>>>> Maybe even write: >> >>>>> Failed to find the location of the 'bytes' variable at this address. >> >>> OK, He, could you also include this fix? >> >> I agree with the change, makes things clearer, will do the change >> myself. If He has any objection to that, I can fix things up before >> pushing it to Ingo, Opps, I missed this... > > So, this is the end result: > > - if (ret == -ENOENT || ret == -EINVAL) > - pr_err("Failed to find the location of %s at this address.\n" > - " Perhaps, it has been optimized out.\n", pf->pvar->var); > - else if (ret == -ENOTSUP) > + if (ret == -ENOENT || ret == -EINVAL) { > + pr_err("Failed to find the location of the '%s' variable at this address.\n" > + " Perhaps it has been optimized out.\n" > + " Use -V with the --range option to show '%s' location range.\n", > + pf->pvar->var, pf->pvar->var); > + } else if (ret == -ENOTSUP) OK, I ack this change. Thank you, -- 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/