Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753180AbbDGIbG (ORCPT ); Tue, 7 Apr 2015 04:31:06 -0400 Received: from szxga01-in.huawei.com ([58.251.152.64]:62576 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751528AbbDGIbB (ORCPT ); Tue, 7 Apr 2015 04:31:01 -0400 Message-ID: <55239590.2020109@huawei.com> Date: Tue, 7 Apr 2015 16:30:08 +0800 From: Wang Nan User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: Jiri Olsa , , , CC: , , , Subject: Re: [PATCH 1/4] perf tools: unwind: ensure unwind hooks return negative errorno. References: <1427884395-241111-1-git-send-email-wangnan0@huawei.com> <1427884395-241111-2-git-send-email-wangnan0@huawei.com> <20150401121222.GA10820@krava.brq.redhat.com> <551BE78A.6070800@huawei.com> In-Reply-To: <551BE78A.6070800@huawei.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.111.69.129] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1851 Lines: 47 Hi folks, I'm rethinking --map-adjustment now, and I believe what we need should be something like 'perf inject', which allows us to inject fake mmap events into perf.data to make 'perf report' believe some //anon memory are file based mapping. Patch 2/4 - 4/4 seem not useful now. However, patch 1/4 is still useful because it is a bugfix. Could you please drop the other 3 patches and merge this one? Thank you. On 2015/4/1 20:41, Wang Nan wrote: > On 2015/4/1 20:12, Jiri Olsa wrote: >> On Wed, Apr 01, 2015 at 10:33:12AM +0000, Wang Nan wrote: >>> According to man pages of libunwind, unwind hooks should return >>> 'negative value of one of the unw_error_t error-codes', they are >>> different from generic error code. In addition, access_dso_mem() >>> returns '!(size == sizeof(*data))', compiler never ensure it is >>> negative when failure, which causes libunwind get undesire value >>> when accessing //anon memory. >>> >>> This patch fixes this problem by force returning negative value when >>> error, instead of returning 'ret' itself when it is non-zero. >> >> hum, how about find_proc_info callback.. should it follow the same rules? >> > > Yes, but it only returns -EINVAL and dwarf_search_unwind_table(....). The latter > one is part of libunwind so we can trust it returns negative when fail. > >> thanks, >> jirka >> > > > -- > 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/ > -- 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/