X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttv%2Flttv%2Ftraceset.h;h=3112d38b57b9be3d2faafc4ed519ffcffb748d45;hb=b9ce0bad7daf7c0a2333c91fdb1e35d602afe17f;hp=23d8a993d57fe01aa9062ca4de07e75720f10443;hpb=ff5c41f139a6bb482f38668e78d76f1fec339d82;p=lttv.git diff --git a/lttv/lttv/traceset.h b/lttv/lttv/traceset.h index 23d8a993..3112d38b 100644 --- a/lttv/lttv/traceset.h +++ b/lttv/lttv/traceset.h @@ -12,8 +12,8 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. */ #ifndef TRACESET_H @@ -22,9 +22,9 @@ #include #include #include -#include -#include +#include #include + /* A traceset is a set of traces to be analyzed together. */ typedef struct _LttvTraceset LttvTraceset; @@ -43,8 +43,13 @@ struct _LttvTraceset { LttvHooks *event_hooks; struct bt_ctf_iter *iter; GPtrArray *state_trace_handle_index; + gboolean has_precomputed_states; + TimeInterval time_span; + char *common_path; }; +#define TRACE_NAME_SIZE 100 + struct _LttvTrace { // Trace id for babeltrace LttvTraceset *traceset; /* container traceset */ @@ -52,12 +57,16 @@ struct _LttvTrace { LttvAttribute *a; guint ref_count; LttvTraceState *state; + char short_name[TRACE_NAME_SIZE]; + char *full_path; }; /* In babeltrace, the position concept is an iterator. */ struct _LttvTracesetPosition { struct bt_ctf_iter *iter; struct bt_iter_pos *bt_pos; + guint64 timestamp; + int cpu_id; }; /* Tracesets may be added to, removed from and their content listed. */ @@ -84,6 +93,7 @@ gint lttv_traceset_save(LttvTraceset *s); void lttv_traceset_destroy(LttvTraceset *s); +LttvHooks *lttv_traceset_get_hooks(LttvTraceset *s); void lttv_traceset_add(LttvTraceset *s, LttvTrace *t); @@ -106,12 +116,16 @@ LttvTrace *lttv_traceset_get(LttvTraceset *s, unsigned i); void lttv_traceset_remove(LttvTraceset *s, unsigned i); +int lttv_traceset_get_trace_index_from_event(LttvEvent *event); + +int lttv_traceset_get_trace_index_from_handle_id(LttvTraceset *ts, int handle_id); + /* An attributes table is attached to the set and to each trace in the set. */ LttvAttribute *lttv_traceset_attribute(LttvTraceset *s); /* Take a position snapshot */ -LttvTracesetPosition *lttv_traceset_create_current_position(LttvTraceset *traceset); +LttvTracesetPosition *lttv_traceset_create_current_position(const LttvTraceset *traceset); /* Destroy position snapshot */ void lttv_traceset_destroy_position(LttvTracesetPosition *traceset_pos);