lkml.org 
[lkml]   [2020]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/7] perf inject: Do not load map/dso when injecting build-id
On Thu, Sep 24, 2020 at 10:20:51PM +0900, Namhyung Kim wrote:
> On Thu, Sep 24, 2020 at 10:09 PM Jiri Olsa <jolsa@redhat.com> wrote:
> >
> > On Wed, Sep 23, 2020 at 05:05:34PM +0900, Namhyung Kim wrote:
> >
> > SNIP
> >
> > > -static inline int is_no_dso_memory(const char *filename)
> > > -{
> > > - return !strncmp(filename, "[stack", 6) ||
> > > - !strncmp(filename, "/SYSV",5) ||
> > > - !strcmp(filename, "[heap]");
> > > -}
> > > -
> > > static inline int is_android_lib(const char *filename)
> > > {
> > > return strstarts(filename, "/data/app-lib/") ||
> > > @@ -158,7 +143,7 @@ struct map *map__new(struct machine *machine, u64 start, u64 len,
> > > int anon, no_dso, vdso, android;
> > >
> > > android = is_android_lib(filename);
> > > - anon = is_anon_memory(filename, flags);
> > > + anon = is_anon_memory(filename) || flags & MAP_HUGETLB;
> >
> > what's the reason to take 'flags & MAP_HUGETLB' out of is_anon_memory?
>
> The MAP_HUGETLB is defined in uapi/linux/mman.h and I had trouble
> when including the header in the map.h file.

could you share the error? it might be corner case, but it
could bite us in future

also flags are stored just in map not dso so you'd need to
add that as arg to dso__inject_build_id

thanks,
jirka

>
> Thanks
> Namhyung
>

\
 
 \ /
  Last update: 2020-09-24 15:46    [W:0.114 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site