projects
/
lttv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix tar.gz build by removing legacy include to ltt directory
[lttv.git]
/
lttv
/
lttv
/
print.c
diff --git
a/lttv/lttv/print.c
b/lttv/lttv/print.c
index 6ad93419db09fdc28de9f98fff1be751c8fbd668..e8df4ed9f12d5853a44e1a1712db231f186d7d4c 100644
(file)
--- a/
lttv/lttv/print.c
+++ b/
lttv/lttv/print.c
@@
-37,12
+37,8
@@
#include <lttv/filter.h>
#endif
#include <lttv/print.h>
#include <lttv/filter.h>
#endif
#include <lttv/print.h>
-#include <ltt/ltt.h>
-#include <ltt/event.h>
-#include <ltt/trace.h>
#include <stdio.h>
#include <ctype.h>
#include <stdio.h>
#include <ctype.h>
-#include <ltt/ltt-private.h>
#include <babeltrace/ctf/events.h>
#include <string.h>
#include <inttypes.h>
#include <babeltrace/ctf/events.h>
#include <string.h>
#include <inttypes.h>
@@
-264,8
+260,8
@@
void lttv_print_field(LttEvent *e, struct marker_field *f, GString *s,
int getProcessInfosFromEvent(LttvEvent *event, GString* processInfos)
{
int pid=0, tid=0, ppid=0;
int getProcessInfosFromEvent(LttvEvent *event, GString* processInfos)
{
int pid=0, tid=0, ppid=0;
- char *procname;
- struct definition *scope;
+ c
onst c
har *procname;
+
unsigned long timestamp;
int ret = 0;
unsigned long timestamp;
int ret = 0;
@@
-345,14
+341,14
@@
int getCPUIdFromEvent(LttvEvent *event, GString* cpuId_str)
return 0;
}
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(
fields
);
+ 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;
int ret = 0, isSigned = -1, len = 0, i = 0;
- struct definition *index_def;
+ const struct bt_definition *index_def;
switch (fieldType) {
case CTF_TYPE_INTEGER:
switch (fieldType) {
case CTF_TYPE_INTEGER:
- isSigned = bt_ctf_get_int_signedness(
fields
);
+ isSigned = bt_ctf_get_int_signedness(
bt_ctf_get_decl_from_def(fields)
);
if (isSigned == 1) {
g_string_append_printf(fieldsStr, "%lu", bt_ctf_get_int64(fields));
}
if (isSigned == 1) {
g_string_append_printf(fieldsStr, "%lu", bt_ctf_get_int64(fields));
}
@@
-366,15
+362,15
@@
int getFields(struct bt_ctf_event *ctf_event, struct definition const *fields, G
case CTF_TYPE_ARRAY:
g_string_append_printf(fieldsStr, "[ ");
case CTF_TYPE_ARRAY:
g_string_append_printf(fieldsStr, "[ ");
- len = bt_ctf_get_array_len(
fields
);
- if (
index_def = bt_ctf_get_index(ctf_event, fields, i
)) {
+ len = bt_ctf_get_array_len(
bt_ctf_get_decl_from_def(fields)
);
+ if (
(index_def = bt_ctf_get_index(ctf_event, fields, i)
)) {
for (i = 0; i < len; i++) {
if (i > 0) {
g_string_append_printf(fieldsStr, ", ");
}
for (i = 0; i < len; i++) {
if (i > 0) {
g_string_append_printf(fieldsStr, ", ");
}
-
bt_ctf_field_type(
bt_ctf_get_index(ctf_event, fields, i));
+
//bt_ctf_field_type(
bt_ctf_get_index(ctf_event, fields, i));
g_string_append_printf(fieldsStr, " ");
g_string_append_printf(fieldsStr, " ");
- g_string_append_printf(fieldsStr, "[%d] = ");
+ g_string_append_printf(fieldsStr, "[%d] = "
,i
);
getFields(ctf_event, bt_ctf_get_index(ctf_event, fields, i), fieldsStr);
}
}
getFields(ctf_event, bt_ctf_get_index(ctf_event, fields, i), fieldsStr);
}
}
@@
-385,7
+381,9
@@
int getFields(struct bt_ctf_event *ctf_event, struct definition const *fields, G
break;
case CTF_TYPE_UNKNOWN:
break;
case CTF_TYPE_UNKNOWN:
+ g_string_append_printf(fieldsStr, "TYPE UNKNOWN");
default:
default:
+ g_string_append_printf(fieldsStr, "TYPE UNIMP %i",fieldType );
break;
}
return ret;
break;
}
return ret;
@@
-393,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)
{
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;
unsigned int count;
- int i = 0,
j = 0,
ret = 0;
+ int i = 0, ret = 0;
gboolean noError = TRUE;
gboolean noError = TRUE;
-
struct
definition *scope;
+
const struct bt_
definition *scope;
scope = bt_ctf_get_top_level_scope(ctf_event, BT_EVENT_FIELDS);
if (!scope) {
scope = bt_ctf_get_top_level_scope(ctf_event, BT_EVENT_FIELDS);
if (!scope) {
@@
-444,7
+442,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_set_size(a_string,0);
if(long_version){
g_string_append_printf(a_string, "%llu %s: ",
- bt_ctf_get_timestamp
_raw
(event->bt_event),
+ bt_ctf_get_timestamp(event->bt_event),
bt_ctf_event_name(event->bt_event));
}
g_string_append_printf(a_string, "{ %s }", cpuId_str->str);
bt_ctf_event_name(event->bt_event));
}
g_string_append_printf(a_string, "{ %s }", cpuId_str->str);
This page took
0.024716 seconds
and
4
git commands to generate.