Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752875AbbLKCWb (ORCPT ); Thu, 10 Dec 2015 21:22:31 -0500 Received: from szxga02-in.huawei.com ([119.145.14.65]:8741 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751526AbbLKCW3 (ORCPT ); Thu, 10 Dec 2015 21:22:29 -0500 Message-ID: <566A3348.4090001@huawei.com> Date: Fri, 11 Dec 2015 10:22:00 +0800 From: "Wangnan (F)" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: =?UTF-8?B?5bmz5p2+6ZuF5bezIC8gSElSQU1BVFXvvIxNQVNBTUk=?= , "'Arnaldo Carvalho de Melo'" CC: Peter Zijlstra , Adrian Hunter , "linux-kernel@vger.kernel.org" , "linux-perf-users@vger.kernel.org" , Ingo Molnar , "Namhyung Kim" , Jiri Olsa , Alexei Starovoitov Subject: Re: [PATCH perf/core 00/22] perf refcnt debugger API and fixes References: <20151209021047.10245.8918.stgit@localhost.localdomain> <20151209134138.GB15864@kernel.org> <50399556C9727B4D88A595C8584AAB375264FB48@GSjpTKYDCembx32.service.hitachi.net> <56697572.90701@huawei.com> <20151210151239.GB17996@kernel.org> <566A2CA0.8070608@huawei.com> <50399556C9727B4D88A595C8584AAB37526515DD@GSjpTKYDCembx32.service.hitachi.net> In-Reply-To: <50399556C9727B4D88A595C8584AAB37526515DD@GSjpTKYDCembx32.service.hitachi.net> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.111.66.109] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020201.566A3357.002C,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 63a736a63e851d7d786e88b5eb5bc16e Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1299 Lines: 35 On 2015/12/11 10:08, 平松雅巳 / HIRAMATU,MASAMI wrote: > From: Wangnan (F) [mailto:wangnan0@huawei.com] >> On 2015/12/10 23:12, 'Arnaldo Carvalho de Melo' wrote: >> >> [SNIP] >>> 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 :-\ >>> >>> And would be a requirement to change the observed workload :-\ >>> >>> Is this _strictly_ required? >> No. The requirement should be: >> >> 1. The create/get/put/delete functions are non-inline (because dwarf info >> is not as reliable as symbol); >> 2. From their argument list, we can always get the variable we need (the >> pointer of objects, the value of refcnt, etc.) > However, we have to customize it for each application. Perf itself might be OK > but others might have different implementation. If limited to pairwise operations ({{m,c}alloc,strdup} vs free, open vs close), I think it is possible to abstract a uniformed pattern. Thank you. -- 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/