X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=lttv%2Flttv%2Fprint.c;h=0213be73f067430db93336a2c65f257ca5a36c85;hb=d04fa8383cb80eb3c8397edc0134e301f8f7a882;hp=a8de92df4b286cca517e130637cc56052de01e5f;hpb=1f3686cd4d8a0f6c5d9406181b398b6ddd9e0b7e;p=lttv.git diff --git a/lttv/lttv/print.c b/lttv/lttv/print.c index a8de92df..0213be73 100644 --- a/lttv/lttv/print.c +++ b/lttv/lttv/print.c @@ -37,12 +37,8 @@ #include #endif #include -#include -#include -#include #include #include -#include #include #include #include @@ -345,11 +341,11 @@ int getCPUIdFromEvent(LttvEvent *event, GString* cpuId_str) return 0; } -int getFields(struct bt_ctf_event *ctf_event, struct definition const *fields, GString* fieldsStr) +int getFields(struct bt_ctf_event *ctf_event, struct bt_definition const *fields, GString* fieldsStr) { enum ctf_type_id fieldType = bt_ctf_field_type(bt_ctf_get_decl_from_def(fields)); int ret = 0, isSigned = -1, len = 0, i = 0; - const struct definition *index_def; + const struct bt_definition *index_def; switch (fieldType) { case CTF_TYPE_INTEGER: isSigned = bt_ctf_get_int_signedness(bt_ctf_get_decl_from_def(fields)); @@ -357,7 +353,7 @@ int getFields(struct bt_ctf_event *ctf_event, struct definition const *fields, G g_string_append_printf(fieldsStr, "%lu", bt_ctf_get_int64(fields)); } else if (isSigned == 0) { - g_string_append_printf(fieldsStr, "%llu", bt_ctf_get_uint64(fields)); + g_string_append_printf(fieldsStr, "%" PRIu64 , bt_ctf_get_uint64(fields)); } break; case CTF_TYPE_STRING: @@ -395,11 +391,11 @@ int getFields(struct bt_ctf_event *ctf_event, struct definition const *fields, G int getFieldsFromEvent(struct bt_ctf_event *ctf_event, GString* fields, gboolean field_names) { - struct definition const * const *list = NULL; + struct bt_definition const * const *list = NULL; unsigned int count; int i = 0, ret = 0; gboolean noError = TRUE; - const struct definition *scope; + const struct bt_definition *scope; scope = bt_ctf_get_top_level_scope(ctf_event, BT_EVENT_FIELDS); if (!scope) { @@ -445,7 +441,7 @@ void lttv_event_to_string(LttvEvent *event, GString *a_string, g_string_set_size(a_string,0); if(long_version){ - g_string_append_printf(a_string, "%llu %s: ", + g_string_append_printf(a_string,"%" PRIu64 " %s: ", bt_ctf_get_timestamp(event->bt_event), bt_ctf_event_name(event->bt_event)); } @@ -493,11 +489,10 @@ void lttv_event_to_string(LttEvent *e, GString *s, gboolean mandatory_fields, ltt_trace_name(ltt_tracefile_get_trace(tfs->parent.tf))), g_quark_to_string(ltt_tracefile_name(tfs->parent.tf)), cpu); /* Print the process id and the state/interrupt type of the process */ - g_string_append_printf(s,", %u, %u, %s, %s, %u, 0x%" PRIx64", %s", + g_string_append_printf(s,", %u, %u, %s, %u, 0x%" PRIx64", %s", process->pid, process->tgid, g_quark_to_string(process->name), - g_quark_to_string(process->brand), process->ppid, process->current_function, g_quark_to_string(process->state->t));