From: Gaurav Jain <gjain@fb.com>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Don Zickus <dzickus@redhat.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@kernel.org>, Jiri Olsa <jolsa@redhat.com>,
Paul Mackerras <paulus@samba.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Arun Sharma <asharma@fb.com>
Subject: Re: [PATCH] perf tools: Synthesize anon MMAP records on the heap
Date: Thu, 16 Jan 2014 02:40:49 +0000 [thread overview]
Message-ID: <5EB282DB-CB9D-498B-B36F-4899D954630F@fb.com> (raw)
In-Reply-To: <87lhyg91um.fsf@sejong.aot.lge.com>
Hi Namhyung,
> On Jan 15, 2014, at 8:01 PM, "Namhyung Kim" <namhyung@kernel.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@kernel.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
next prev parent reply other threads:[~2014-01-16 2:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-12 4:32 Gaurav Jain
2014-01-13 8:59 ` Namhyung Kim
2014-01-13 16:54 ` Don Zickus
2014-01-14 20:48 ` Gaurav Jain
2014-01-15 5:46 ` Namhyung Kim
2014-01-15 6:44 ` Gaurav Jain
2014-01-16 1:01 ` Namhyung Kim
2014-01-16 2:40 ` Gaurav Jain [this message]
2014-01-15 14:27 ` Don Zickus
2014-01-16 1:03 ` Namhyung Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5EB282DB-CB9D-498B-B36F-4899D954630F@fb.com \
--to=gjain@fb.com \
--cc=a.p.zijlstra@chello.nl \
--cc=asharma@fb.com \
--cc=dzickus@redhat.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®