[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <566A3AB2.2020700@huawei.com>
Date: Fri, 11 Dec 2015 10:53:38 +0800
From: "Wangnan (F)" <wangnan0@...wei.com>
To: 平松雅巳 / HIRAMATU,MASAMI
<masami.hiramatsu.pt@...achi.com>,
"'Arnaldo Carvalho de Melo'" <acme@...nel.org>
CC: Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Adrian Hunter <adrian.hunter@...el.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-perf-users@...r.kernel.org" <linux-perf-users@...r.kernel.org>,
Ingo Molnar <mingo@...hat.com>,
"Namhyung Kim" <namhyung@...nel.org>, Jiri Olsa <jolsa@...hat.com>,
Alexei Starovoitov <ast@...mgrid.com>
Subject: Re: [PATCH perf/core 00/22] perf refcnt debugger API and fixes
On 2015/12/11 10:42, Wangnan (F) wrote:
>
>
> On 2015/12/11 10:15, 平松雅巳 / HIRAMATU,MASAMI wrote:
>> From: 'Arnaldo Carvalho de Melo' [mailto:acme@...nel.org]
>>> But this requires having these special refcnt__ routines, that will
>>> make
>>> tools/perf/ code patterns for reference counts look different that the
>>> refcount patterns in the kernel :-\
>> BTW, I think even without the refcnt debugger, we'd better introduce
>> this
>> kind API to unify the refcnt operation in perf code. As I said, we
>> have many
>> miscodings on current implementation. Unifying the API can enforce
>> developers
>> to avoid such miscodings.
>>
>> Thank you,
>>
>
> I tried this problem in another way, I'd like to share it here.
>
> First: create two uprobes:
>
> # ./perf probe --exec /home/wangnan/perf dso__new%return %ax
> Added new event:
> probe_perf:dso__new (on dso__new%return in /home/wangnan/perf with
> %ax)
>
> You can now use it in all perf tools, such as:
>
> perf record -e probe_perf:dso__new -aR sleep 1
>
> # ./perf probe --exec /home/wangnan/perf dso__delete dso
> Added new event:
> probe_perf:dso__delete (on dso__delete in /home/wangnan/perf with dso)
>
> You can now use it in all perf tools, such as:
>
> perf record -e probe_perf:dso__delete -aR sleep 1
>
>
> Then start test:
>
> # ./perf record -g -e probe_perf:dso__new -e probe_perf:dso__delete
> ./perf probe vfs_read
> Added new event:
> probe:vfs_read (on vfs_read)
>
> You can now use it in all perf tools, such as:
>
> perf record -e probe:vfs_read -aR sleep 1
>
> [ perf record: Woken up 1 times to write data ]
> [ perf record: Captured and wrote 0.048 MB perf.data (178 samples) ]
>
>
> From the perf report result I know two dso objects are leak:
>
> 90 probe_perf:dso__new `
> 88 probe_perf:dso__delete
>
The above result is gotten from yesterday's perf/core. I also tried
today's perf/core and get:
90 probe_perf:dso__new `
90 probe_perf:dso__delete
So we fix these leak.
Thank you.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists