Re: [PATCH v6 2/5] perf/jevents: Add new structure to pass json fields.

2020-09-01 Thread Jiri Olsa
On Tue, Sep 01, 2020 at 11:32:45AM +0530, kajoljain wrote: > > > On 8/31/20 2:13 PM, Jiri Olsa wrote: > > On Thu, Aug 27, 2020 at 06:39:55PM +0530, Kajol Jain wrote: > > > > SNIP > > > >> - if (!*field)\ > >> +#define TRY_FIXUP_FIELD(field) do { if (

Re: [PATCH v6 2/5] perf/jevents: Add new structure to pass json fields.

2020-08-31 Thread kajoljain
On 8/31/20 2:13 PM, Jiri Olsa wrote: > On Thu, Aug 27, 2020 at 06:39:55PM +0530, Kajol Jain wrote: > > SNIP > >> -if (!*field)\ >> +#define TRY_FIXUP_FIELD(field) do { if (es->field && !je->field) {\ >> +je->field = strdup(es->field);

Re: [PATCH v6 2/5] perf/jevents: Add new structure to pass json fields.

2020-08-31 Thread Jiri Olsa
On Thu, Aug 27, 2020 at 06:39:55PM +0530, Kajol Jain wrote: SNIP > - if (!*field)\ > +#define TRY_FIXUP_FIELD(field) do { if (es->field && !je->field) {\ > + je->field = strdup(es->field); \ > + if (!je->field)

[PATCH v6 2/5] perf/jevents: Add new structure to pass json fields.

2020-08-27 Thread Kajol Jain
This patch adds new structure called 'json_event' inside jevents.h file to improve the callback prototype inside jevent files. Initially, whenever user want to add new field, they need to update in all function callback which make it more and more complex with increased number of parmeters. With th