lkml.org 
[lkml]   [2021]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 08/22] perf daemon: Add config file change check
On Sun, Jan 3, 2021 at 7:05 AM Jiri Olsa <jolsa@kernel.org> wrote:
>
> Adding support to detect daemon's config file changes
> and re-read the configuration when that happens.

Hmm.. maybe some of the code in the previous commit can be moved here.

Thanks,
Namhyung

>
> Using inotify file descriptor pluged into the main
> fdarray object for polling.
>
> Example:
>
> # cat ~/.perfconfig
> [daemon]
> base=/opt/perfdata
>
> [session-cycles]
> run = -m 10M -e cycles --overwrite --switch-output -a
>
> Starting the daemon:
>
> # perf daemon start
>
> Check sessions:
>
> # perf daemon
> [772262:daemon] base: /opt/perfdata
> [772263:cycles] perf record -m 10M -e cycles --overwrite --switch-output -a
>
> Change '-m 10M' to '-m 20M', and check daemon log:
>
> # tail -f /opt/perfdata/output
> [2021-01-02 20:31:41.234045] daemon started (pid 772262)
> [2021-01-02 20:31:41.235072] reconfig: ruining session [cycles:772263]: -m 10M -e cycles --overwrite --switch-output -a
> [2021-01-02 20:32:08.310137] reconfig: session 'cycles' killed
> [2021-01-02 20:32:08.310847] reconfig: ruining session [cycles:772338]: -m 20M -e cycles --overwrite --switch-output -a
>
> And the session list:
>
> # perf daemon
> [772262:daemon] base: /opt/perfdata
> [772338:cycles] perf record -m 20M -e cycles --overwrite --switch-output -a
>
> Note the changed '-m 20M' option is in place.
>
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> ---

\
 
 \ /
  Last update: 2021-01-19 07:54    [W:1.081 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site