From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754168AbaI2RaM (ORCPT ); Mon, 29 Sep 2014 13:30:12 -0400 Received: from g6t1526.atlanta.hp.com ([15.193.200.69]:60711 "EHLO g6t1526.atlanta.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752926AbaI2RaL (ORCPT ); Mon, 29 Sep 2014 13:30:11 -0400 Message-ID: <5429971F.9050405@hp.com> Date: Mon, 29 Sep 2014 13:30:07 -0400 From: Waiman Long User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130109 Thunderbird/10.0.12 MIME-Version: 1.0 To: Namhyung Kim CC: Arnaldo Carvalho de Melo , Peter Zijlstra , Paul Mackerras , Ingo Molnar , linux-kernel@vger.kernel.org, Scott J Norton , Douglas Hatch , Don Zickus , Jiri Olsa , Adrian Hunter Subject: Re: [PATCH v4 1/2] perf tool: encapsulate dsos list head into struct dsos References: <1411573540-8765-1-git-send-email-Waiman.Long@hp.com> <1411573540-8765-2-git-send-email-Waiman.Long@hp.com> <20140926140625.GA3879@kernel.org> <87h9zrhyjr.fsf@sejong.aot.lge.com> In-Reply-To: <87h9zrhyjr.fsf@sejong.aot.lge.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/28/2014 11:54 PM, Namhyung Kim wrote: > Hi Arnaldo and Waiman, > > On Fri, 26 Sep 2014 11:06:25 -0300, Arnaldo Carvalho de Melo wrote: >> Em Wed, Sep 24, 2014 at 11:45:39AM -0400, Waiman Long escreveu: >>> This is a precursor patch to enable long name searching of DSOs >>> using the rbtree. In this patch, a new dsos structure is created >>> which contains only a list head structure for the moment. The new >>> dsos structure is used, in turn, in the machine structure for the >>> user_dsos and kernel_dsos fields. Only the following 3 dsos functions >>> are modified to accept the new dsos structure parameter instead >>> of list_head: >>> - dsos__add() >>> - dsos__find() >>> - __dsos__findnew() >>> >>> Because of the need to find out the corresponding dsos structure to >>> properly call dsos__add() in dso__load_sym() of util/symbol-elf.c, >>> a new dsos field is also added to the dso structure. >> Argh, yeah, that is unfortunate that we need to add entries that deep >> inside dso__load_syms() :-\ > But it seems we can use map->groups->machine to find out the head/root > of the dsos.. > > Thanks, > Namhyung > There are 2 dsos at the machine structure level - user_dsos and kernel_dsos. In this particular case, it should be kernel_dsos. I can remove the dsos pointer and hardcode it to use the kernel_dsos if you guys think it is acceptable. -Longman