Message ID | 166793221113.3768752.2422093575535918509.stgit@djiang5-desk3.ch.intel.com |
---|---|
State | New, archived |
Headers | show |
Series | cxl: add monitor support for trace events | expand |
On Tue, 2022-11-08 at 11:30 -0700, Dave Jiang wrote: > Add a common function for cxl command that disables the event trace for the > instance created. > > Signed-off-by: Dave Jiang <dave.jiang@intel.com> > --- > cxl/event_trace.c | 5 +++++ > cxl/event_trace.h | 1 + > 2 files changed, 6 insertions(+) This and the previous patch are very siomilar pre-requisite enabling - I think they can be squashed into a single patch. > > diff --git a/cxl/event_trace.c b/cxl/event_trace.c > index 95b0ce071166..490c30e1dbfc 100644 > --- a/cxl/event_trace.c > +++ b/cxl/event_trace.c > @@ -251,3 +251,8 @@ int cxl_event_tracing_enable(struct tracefs_instance *inst, const char *system, > tracefs_trace_on(inst); > return 0; > } > + > +int cxl_event_tracing_disable(struct tracefs_instance *inst) > +{ > + return tracefs_trace_off(inst); > +} > diff --git a/cxl/event_trace.h b/cxl/event_trace.h > index aecf9aa96187..89e98cafb320 100644 > --- a/cxl/event_trace.h > +++ b/cxl/event_trace.h > @@ -22,5 +22,6 @@ struct event_ctx { > int cxl_parse_events(struct tracefs_instance *inst, struct event_ctx *ectx); > int cxl_event_tracing_enable(struct tracefs_instance *inst, const char *system, > const char *event); > +int cxl_event_tracing_disable(struct tracefs_instance *inst); > > #endif > >
diff --git a/cxl/event_trace.c b/cxl/event_trace.c index 95b0ce071166..490c30e1dbfc 100644 --- a/cxl/event_trace.c +++ b/cxl/event_trace.c @@ -251,3 +251,8 @@ int cxl_event_tracing_enable(struct tracefs_instance *inst, const char *system, tracefs_trace_on(inst); return 0; } + +int cxl_event_tracing_disable(struct tracefs_instance *inst) +{ + return tracefs_trace_off(inst); +} diff --git a/cxl/event_trace.h b/cxl/event_trace.h index aecf9aa96187..89e98cafb320 100644 --- a/cxl/event_trace.h +++ b/cxl/event_trace.h @@ -22,5 +22,6 @@ struct event_ctx { int cxl_parse_events(struct tracefs_instance *inst, struct event_ctx *ectx); int cxl_event_tracing_enable(struct tracefs_instance *inst, const char *system, const char *event); +int cxl_event_tracing_disable(struct tracefs_instance *inst); #endif
Add a common function for cxl command that disables the event trace for the instance created. Signed-off-by: Dave Jiang <dave.jiang@intel.com> --- cxl/event_trace.c | 5 +++++ cxl/event_trace.h | 1 + 2 files changed, 6 insertions(+)