lkml.org 
[lkml]   [2020]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 3/9] perf mem: Support new memory event PERF_MEM_EVENTS__LOAD_STORE
On Sat, Oct 31, 2020 at 09:23:07PM +0100, Jiri Olsa wrote:
> On Wed, Oct 28, 2020 at 02:38:07PM +0800, Leo Yan wrote:
>
> SNIP
>
> > struct stat st;
> >
> > + /*
> > + * If the event entry isn't valid, skip initialization
> > + * and "e->supported" will keep false.
> > + */
> > + if (!e->tag)
> > + continue;
> > +
> > scnprintf(path, PATH_MAX, "%s/devices/%s",
> > mnt, e->sysfs_name);
> >
> > @@ -123,7 +134,7 @@ void perf_mem_events__list(void)
> > struct perf_mem_event *e = perf_mem_events__ptr(j);
> >
> > fprintf(stderr, "%-13s%-*s%s\n",
> > - e->tag,
> > + e->tag ? e->tag : "",
>
> nit, could be: e->tag ?: "",

Will do.

Thanks,
Leo

> > verbose > 0 ? 25 : 0,
> > verbose > 0 ? perf_mem_events__name(j) : "",
> > e->supported ? ": available" : "");
> > diff --git a/tools/perf/util/mem-events.h b/tools/perf/util/mem-events.h
> > index 726a9c8103e4..5ef178278909 100644
> > --- a/tools/perf/util/mem-events.h
> > +++ b/tools/perf/util/mem-events.h
> > @@ -28,6 +28,7 @@ struct mem_info {
> > enum {
> > PERF_MEM_EVENTS__LOAD,
> > PERF_MEM_EVENTS__STORE,
> > + PERF_MEM_EVENTS__LOAD_STORE,
> > PERF_MEM_EVENTS__MAX,
> > };
> >
> > --
> > 2.17.1
> >
>

\
 
 \ /
  Last update: 2020-11-02 10:39    [W:0.044 / U:1.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site