X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=lttv%2Flttv%2Ftraceset.h;h=6af2e39cbb7eba0a26a89b59e7ce47989f892d34;hb=451aaf275d421d71097d479eb0ae64fe908d8b6f;hp=9d62687686e0b19a4cc8691379d24de88ea75722;hpb=7a4bdb546094fea3343bfc80e3744ea26a08dd22;p=lttv.git diff --git a/lttv/lttv/traceset.h b/lttv/lttv/traceset.h index 9d626876..6af2e39c 100644 --- a/lttv/lttv/traceset.h +++ b/lttv/lttv/traceset.h @@ -41,8 +41,7 @@ struct _LttvTraceset { LttvAttribute *a; LttvHooks *event_hooks; struct bt_ctf_iter *iter; - LttvTraceState *tmpState; - + GPtrArray *state_trace_handle_index; }; struct _LttvTrace { @@ -57,6 +56,7 @@ struct _LttvTrace { /* In babeltrace, the position concept is an iterator. */ struct _LttvTracesetPosition { struct bt_ctf_iter *iter; + struct bt_iter_pos *bt_pos; }; /* Tracesets may be added to, removed from and their content listed. */ @@ -69,6 +69,8 @@ char * lttv_traceset_name(LttvTraceset * s); LttvTrace *lttv_trace_new(LttTrace *t); #endif +void get_absolute_pathname(const gchar *pathname, gchar * abs_pathname); + LttvTraceset *lttv_traceset_copy(LttvTraceset *s_orig); LttvTraceset *lttv_traceset_load(const gchar *filename); @@ -85,18 +87,17 @@ void lttv_traceset_destroy(LttvTraceset *s); void lttv_traceset_add(LttvTraceset *s, LttvTrace *t); /* - * lttv_traceset_add_path : Add all traces recursively to a traceset + * lttv_trace_create : Add all traces recursively to a traceset from a path * + * * ts is the traceset in which will be contained the traces * - * path is a path to a trace(s). It cannot be NULL and it is not parse - * recursively. - * todo mdenis: implement algorithm to go through all folders recursively to - * find all traces in the path + * trace_path is the path where to find a set of trace. + * Traverse the path recursively to add all traces within. * - * @return 0 on success, -1 on failure + * return 0 on success or a negative integer on failure */ -int lttv_traceset_add_path(LttvTraceset *ts, const char *path); +int lttv_traceset_add_path(LttvTraceset *ts, char *path); unsigned lttv_traceset_number(LttvTraceset *s); @@ -108,11 +109,6 @@ void lttv_traceset_remove(LttvTraceset *s, unsigned i); LttvAttribute *lttv_traceset_attribute(LttvTraceset *s); - -#ifdef BABEL_CLEANUP -LttTrace *lttv_trace(LttvTrace *t); -#endif - /* Take a position snapshot */ LttvTracesetPosition *lttv_traceset_create_position(LttvTraceset *traceset); @@ -122,6 +118,10 @@ void lttv_traceset_destroy_position(LttvTracesetPosition *traceset_pos); void lttv_traceset_seek_to_position(LttvTracesetPosition *traceset_pos); guint lttv_traceset_get_cpuid_from_event(LttvEvent *event); +/* Returns the minimum timestamp of the traces in the traceset */ +guint64 lttv_traceset_get_timestamp_begin(LttvTraceset *traceset); +/* Returns the maximum timestamp of the traces in the traceset */ +guint64 lttv_traceset_get_timestamp_end(LttvTraceset *traceset); const char *lttv_traceset_get_name_from_event(LttvEvent *event);