lkml.org 
[lkml]   [2023]   [Nov]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 6/8] perf annotate: Ensure init/exit for global options
On Tue, Nov 28, 2023 at 11:21 AM Ian Rogers <irogers@google.com> wrote:
>
> On Tue, Nov 28, 2023 at 9:54 AM Namhyung Kim <namhyung@kernel.org> wrote:
> >
> > Now it only cares about the global options so it can just handle it
> > without the argument.
>
> If annotate_opts were accessed by a function then you could
> pthread_once the initialization on the first call to get
> annotate_opts. Removing annotation_options__init/exit would remove
> some potential for error.

Currently all call sites (perf annotate, report and top) initialize the
options and check if it has conflicting options before running the
commands. So I'm not sure if it needs pthread_once() for that.

Thanks,
Namhyung

\
 
 \ /
  Last update: 2023-11-30 01:02    [W:2.437 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site