Re: [PATCH 06/24] perf daemon: Add config file support

2021-02-11 Thread Jiri Olsa
On Thu, Feb 11, 2021 at 02:10:48PM -0300, Arnaldo Carvalho de Melo wrote: > Em Thu, Feb 11, 2021 at 05:45:38PM +0100, Jiri Olsa escreveu: > > On Thu, Feb 11, 2021 at 03:01:12PM +0900, Namhyung Kim wrote: > > > Hi Jiri, > > > > > > On Tue, Feb 9, 2021 at 5:09 AM Jiri Olsa wrote: > > > > +static in

Re: [PATCH 06/24] perf daemon: Add config file support

2021-02-11 Thread Arnaldo Carvalho de Melo
Em Thu, Feb 11, 2021 at 05:45:38PM +0100, Jiri Olsa escreveu: > On Thu, Feb 11, 2021 at 03:01:12PM +0900, Namhyung Kim wrote: > > Hi Jiri, > > > > On Tue, Feb 9, 2021 at 5:09 AM Jiri Olsa wrote: > > > +static int daemon__reconfig(struct daemon *daemon) > > > +{ > > > + struct daemon_session

Re: [PATCH 06/24] perf daemon: Add config file support

2021-02-11 Thread Jiri Olsa
On Thu, Feb 11, 2021 at 03:01:12PM +0900, Namhyung Kim wrote: > Hi Jiri, > > On Tue, Feb 9, 2021 at 5:09 AM Jiri Olsa wrote: > > +static int daemon__reconfig(struct daemon *daemon) > > +{ > > + struct daemon_session *session, *n; > > + > > + list_for_each_entry_safe(session, n, &daemo

Re: [PATCH 06/24] perf daemon: Add config file support

2021-02-10 Thread Namhyung Kim
Hi Jiri, On Tue, Feb 9, 2021 at 5:09 AM Jiri Olsa wrote: > +static int daemon__reconfig(struct daemon *daemon) > +{ > + struct daemon_session *session, *n; > + > + list_for_each_entry_safe(session, n, &daemon->sessions, list) { > + /* No change. */ > + if (

[PATCH 06/24] perf daemon: Add config file support

2021-02-08 Thread Jiri Olsa
Adding support to configure daemon with config file. Each client or server invocation of perf daemon needs to know the base directory, where all sessions data is stored. The base is defined with: daemon.base Base path for daemon data. All sessions data are stored under this path. The

Re: [PATCH 06/24] perf daemon: Add config file support

2021-02-06 Thread Namhyung Kim
On Sun, Feb 7, 2021 at 7:35 AM Jiri Olsa wrote: > > On Sat, Feb 06, 2021 at 05:05:04PM +0900, Namhyung Kim wrote: > > On Fri, Feb 5, 2021 at 9:56 PM Jiri Olsa wrote: > > > > > > On Fri, Feb 05, 2021 at 09:14:54PM +0900, Namhyung Kim wrote: > > > > On Sun, Jan 31, 2021 at 8:49 AM Jiri Olsa wrote:

Re: [PATCH 06/24] perf daemon: Add config file support

2021-02-06 Thread Jiri Olsa
On Sat, Feb 06, 2021 at 05:05:04PM +0900, Namhyung Kim wrote: > On Fri, Feb 5, 2021 at 9:56 PM Jiri Olsa wrote: > > > > On Fri, Feb 05, 2021 at 09:14:54PM +0900, Namhyung Kim wrote: > > > On Sun, Jan 31, 2021 at 8:49 AM Jiri Olsa wrote: > > > [SNIP] > > > > @@ -263,9 +605,16 @@ static int __cmd_s

Re: [PATCH 06/24] perf daemon: Add config file support

2021-02-06 Thread Jiri Olsa
On Thu, Feb 04, 2021 at 04:08:50PM +0100, Jiri Olsa wrote: SNIP > > > + > > > +static void session__free(struct session *session) > > > +{ > > > + free(session->base); > > > + free(session->name); > > > + free(session->run); > > > > zfree() so that if there is some dangling pointer to session, w

Re: [PATCH 06/24] perf daemon: Add config file support

2021-02-06 Thread Namhyung Kim
On Fri, Feb 5, 2021 at 12:10 AM Jiri Olsa wrote: > > On Thu, Feb 04, 2021 at 09:58:19AM -0300, Arnaldo Carvalho de Melo wrote: > > Em Thu, Feb 04, 2021 at 09:42:35PM +0900, Namhyung Kim escreveu: > > > Hi Jiri, > > > > > > On Sun, Jan 31, 2021 at 8:49 AM Jiri Olsa wrote: > > > [SNIP] > > > > +#de

Re: [PATCH 06/24] perf daemon: Add config file support

2021-02-06 Thread Namhyung Kim
On Fri, Feb 5, 2021 at 9:56 PM Jiri Olsa wrote: > > On Fri, Feb 05, 2021 at 09:14:54PM +0900, Namhyung Kim wrote: > > On Sun, Jan 31, 2021 at 8:49 AM Jiri Olsa wrote: > > [SNIP] > > > @@ -263,9 +605,16 @@ static int __cmd_start(struct daemon *daemon, struct > > > option parent_options[], > > >

Re: [PATCH 06/24] perf daemon: Add config file support

2021-02-05 Thread Jiri Olsa
On Fri, Feb 05, 2021 at 09:14:54PM +0900, Namhyung Kim wrote: > On Sun, Jan 31, 2021 at 8:49 AM Jiri Olsa wrote: > [SNIP] > > @@ -263,9 +605,16 @@ static int __cmd_start(struct daemon *daemon, struct > > option parent_options[], > > signal(SIGTERM, sig_handler); > > > > while (!do

Re: [PATCH 06/24] perf daemon: Add config file support

2021-02-05 Thread Namhyung Kim
On Sun, Jan 31, 2021 at 8:49 AM Jiri Olsa wrote: [SNIP] > @@ -263,9 +605,16 @@ static int __cmd_start(struct daemon *daemon, struct > option parent_options[], > signal(SIGTERM, sig_handler); > > while (!done && !err) { > - if (fdarray__poll(&fda, -1)) { > +

Re: [PATCH 06/24] perf daemon: Add config file support

2021-02-04 Thread Jiri Olsa
On Thu, Feb 04, 2021 at 09:58:19AM -0300, Arnaldo Carvalho de Melo wrote: > Em Thu, Feb 04, 2021 at 09:42:35PM +0900, Namhyung Kim escreveu: > > Hi Jiri, > > > > On Sun, Jan 31, 2021 at 8:49 AM Jiri Olsa wrote: > > [SNIP] > > > +#define SESSION_OUTPUT "output" > > > + > > > +/* > > > + * Session

Re: [PATCH 06/24] perf daemon: Add config file support

2021-02-04 Thread Jiri Olsa
On Wed, Feb 03, 2021 at 06:12:11PM -0300, Arnaldo Carvalho de Melo wrote: SNIP > > -static struct daemon __daemon = { }; > > +static struct daemon __daemon = { > > + .sessions = LIST_HEAD_INIT(__daemon.sessions), > > +}; > > > > static const char * const daemon_usage[] = { > > "perf daem

Re: [PATCH 06/24] perf daemon: Add config file support

2021-02-04 Thread Arnaldo Carvalho de Melo
Em Thu, Feb 04, 2021 at 09:42:35PM +0900, Namhyung Kim escreveu: > Hi Jiri, > > On Sun, Jan 31, 2021 at 8:49 AM Jiri Olsa wrote: > [SNIP] > > +#define SESSION_OUTPUT "output" > > + > > +/* > > + * Session states: > > + * > > + * OK - session is up and running > > + * RECONFIG - session

Re: [PATCH 06/24] perf daemon: Add config file support

2021-02-04 Thread Namhyung Kim
Hi Jiri, On Sun, Jan 31, 2021 at 8:49 AM Jiri Olsa wrote: [SNIP] > +#define SESSION_OUTPUT "output" > + > +/* > + * Session states: > + * > + * OK - session is up and running > + * RECONFIG - session is pending for reconfiguration, > + * new values are already loaded in se

Re: [PATCH 06/24] perf daemon: Add config file support

2021-02-03 Thread Arnaldo Carvalho de Melo
Em Sun, Jan 31, 2021 at 12:48:38AM +0100, Jiri Olsa escreveu: > Adding support to configure daemon with config file. > > Each client or server invocation of perf daemon needs to know the > base directory, where all sessions data is stored. > > The base is defined with: > > daemon.base > Ba

[PATCH 06/24] perf daemon: Add config file support

2021-01-30 Thread Jiri Olsa
Adding support to configure daemon with config file. Each client or server invocation of perf daemon needs to know the base directory, where all sessions data is stored. The base is defined with: daemon.base Base path for daemon data. All sessions data are stored under this path. The