tools lib traceevent: Implement new API tep_get_ref()
This patch implements a new API of the tracevent library: int tep_get_ref(struct tep_handle *tep); The API returns the reference counter "ref_count" of the tep handler. As "struct tep_handle" is internal only, its members cannot be accessed by the library users, the API is used to get the reference counter. Signed-off-by: Tzvetomir Stoyanov <tstoyanov@vmware.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: http://lkml.kernel.org/r/20181130154646.890615385@goodmis.org Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
committed by
Arnaldo Carvalho de Melo
parent
239ca3e786
commit
477be10ca7
@@ -581,6 +581,7 @@ struct tep_handle *tep_alloc(void);
|
||||
void tep_free(struct tep_handle *pevent);
|
||||
void tep_ref(struct tep_handle *pevent);
|
||||
void tep_unref(struct tep_handle *pevent);
|
||||
int tep_get_ref(struct tep_handle *tep);
|
||||
|
||||
/* access to the internal parser */
|
||||
void tep_buffer_init(const char *buf, unsigned long long size);
|
||||
|
||||
Reference in New Issue
Block a user