lkml.org 
[lkml]   [2020]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 4/9] perf tools: Maintain cgroup hierarchy
Hi Jiri,

On Thu, Jan 9, 2020 at 6:52 AM Jiri Olsa <jolsa@redhat.com> wrote:
>
> On Tue, Jan 07, 2020 at 10:34:56PM +0900, Namhyung Kim wrote:
> > Each cgroup is kept in the global cgroup_tree sorted by the cgroup id.
> > Hist entries have cgroup id can compare it directly and later it can
> > be used to find a group name using this tree.
> >
> > Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> > ---
> > tools/perf/util/cgroup.c | 72 +++++++++++++++++++++++++++++++++++++++
> > tools/perf/util/cgroup.h | 15 +++++---
> > tools/perf/util/machine.c | 7 ++++
> > tools/perf/util/session.c | 4 +++
> > 4 files changed, 94 insertions(+), 4 deletions(-)
> >
> > diff --git a/tools/perf/util/cgroup.c b/tools/perf/util/cgroup.c
> > index 4881d4af3381..4e8ef1db0c94 100644
> > --- a/tools/perf/util/cgroup.c
> > +++ b/tools/perf/util/cgroup.c
> > @@ -13,6 +13,8 @@
> >
> > int nr_cgroups;
> >
> > +static struct rb_root cgroup_tree = RB_ROOT;
>
> I think we shoud carry that in 'struct perf_env'

OK, will move.

Thanks
Namhyung

\
 
 \ /
  Last update: 2020-01-09 01:52    [W:0.104 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site