@@ -48,6 +48,9 @@ int tracecmd_buffer_instances(struct tracecmd_input *handle);
const char *tracecmd_buffer_instance_name(struct tracecmd_input *handle, int indx);
struct tracecmd_input *tracecmd_buffer_instance_handle(struct tracecmd_input *handle, int indx);
+void tracecmd_set_private(struct tracecmd_input *handle, void *data);
+void *tracecmd_get_private(struct tracecmd_input *handle);
+
int tracecmd_iterate_events(struct tracecmd_input *handle,
cpu_set_t *cpus, int cpu_size,
int (*callback)(struct tracecmd_input *handle,
@@ -215,6 +215,8 @@ struct tracecmd_input {
/* For custom profilers. */
tracecmd_show_data_func show_data_func;
+
+ void *private;
};
__thread struct tracecmd_input *tracecmd_curr_thread_handle;
@@ -245,6 +247,16 @@ enum tracecmd_file_states tracecmd_get_file_state(struct tracecmd_input *handle)
return handle->file_state;
}
+void tracecmd_set_private(struct tracecmd_input *handle, void *data)
+{
+ handle->private = data;
+}
+
+void *tracecmd_get_private(struct tracecmd_input *handle)
+{
+ return handle->private;
+}
+
#if DEBUG_RECORD
static void remove_record(struct page *page, struct tep_record *record)
{