[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5EB282DB-CB9D-498B-B36F-4899D954630F@fb.com>
Date: Thu, 16 Jan 2014 02:40:49 +0000
From: Gaurav Jain <gjain@...com>
To: Namhyung Kim <namhyung@...nel.org>
CC: Don Zickus <dzickus@...hat.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>, Jiri Olsa <jolsa@...hat.com>,
Paul Mackerras <paulus@...ba.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Arun Sharma <asharma@...com>
Subject: Re: [PATCH] perf tools: Synthesize anon MMAP records on the heap
Hi Namhyung,
> On Jan 15, 2014, at 8:01 PM, "Namhyung Kim" <namhyung@...nel.org> wrote:
>
> Hi Gaurav,
>
>> On Wed, 15 Jan 2014 06:44:39 +0000, Gaurav Jain wrote:
>> Hi Namhyung,
>>
>>
>>> On 1/15/14, 12:46 AM, "Namhyung Kim" <namhyung@...nel.org> wrote:
>>> diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c
>>> index 9b9bd719aa19..d52387fe83f1 100644
>>> --- a/tools/perf/util/map.c
>>> +++ b/tools/perf/util/map.c
>>> @@ -69,7 +69,7 @@ struct map *map__new(struct list_head *dsos__list, u64
>>> start, u64 len,
>>> map->ino = ino;
>>> map->ino_generation = ino_gen;
>>>
>>> - if (anon) {
>>> + if (anon || (no_dso && type == MAP__FUNCTION)) {
>
> Hmm.. I think it should check type of anon mapping too (assuming JIT
> interface only provides function symbols, no?):
>
> if ((anon || no_dso) && type == MAP__FUNCTION)) {
In that case, shouldn't we filter out all mappings that are not executable as I had intended to do in my original patch?
>>> snprintf(newfilename, sizeof(newfilename), "/tmp/perf-%d.map", pid);
>>> filename = newfilename;
>>> }
>>> @@ -93,7 +93,7 @@ struct map *map__new(struct list_head *dsos__list, u64
>>> start, u64 len,
>>> * functions still return NULL, and we avoid the
>>> * unnecessary map__load warning.
>>> */
>>> - if (no_dso)
>>> + if (no_dso && type != MAP__FUNCTION)
>
> And it should be simply:
>
> if (type != MAP__FUNCTION)
>
>
>>> dso__set_loaded(dso, map->type);
>>> }
>>> }
>
> I'll update this and send a formal patch soon. Could you please test it with
> the new patch then?
Sure I'll test the new patch, though please note my previous suggestion.
Gaurav--
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