lkml.org 
[lkml]   [2020]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 6/9] perf record: Support synthesizing cgroup events
On Thu, Jan 9, 2020 at 7:22 AM Jiri Olsa <jolsa@redhat.com> wrote:
>
> On Tue, Jan 07, 2020 at 10:34:58PM +0900, Namhyung Kim wrote:
>
> SNIP
>
> > + closedir(d);
> > + return ret;
> > +}
> > +
> > +int perf_event__synthesize_cgroups(struct perf_tool *tool,
> > + perf_event__handler_t process,
> > + struct machine *machine)
> > +{
> > + union perf_event event;
> > + char *cgrp_root;
> > + size_t mount_len; /* length of mount point in the path */
> > + int ret = -1;
> > +
> > + cgrp_root = malloc(PATH_MAX);
> > + if (cgrp_root == NULL)
> > + return -1;
> > +
>
> hum, we normally use bufs with PATH_MAX size on stack..
> is there some reason to use heap in here?

No specific reason, will change.

Thanks
Namhyung

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