****************************************************************************/
guint32 ltt_event_get_unsigned(LttEvent *e, LttField *f)
{
- gboolean reverse_byte_order = LTT_GET_BO(e->tracefile);
-
+ gboolean reverse_byte_order;
+ if(unlikely(f->field_type.network)) {
+ reverse_byte_order = (g_ntohs(0x1) != 0x1);
+ } else {
+ reverse_byte_order = LTT_GET_BO(e->tracefile);
+ }
+
switch(f->field_size) {
case 1:
{
gint32 ltt_event_get_int(LttEvent *e, LttField *f)
{
- gboolean reverse_byte_order = LTT_GET_BO(e->tracefile);
-
+ gboolean reverse_byte_order;
+ if(unlikely(f->field_type.network)) {
+ reverse_byte_order = (g_ntohs(0x1) != 0x1);
+ } else {
+ reverse_byte_order = LTT_GET_BO(e->tracefile);
+ }
+
switch(f->field_size) {
case 1:
{
guint64 ltt_event_get_long_unsigned(LttEvent *e, LttField *f)
{
- gboolean reverse_byte_order = LTT_GET_BO(e->tracefile);
+ gboolean reverse_byte_order;
+ if(unlikely(f->field_type.network)) {
+ reverse_byte_order = (g_ntohs(0x1) != 0x1);
+ } else {
+ reverse_byte_order = LTT_GET_BO(e->tracefile);
+ }
switch(f->field_size) {
case 1:
gint64 ltt_event_get_long_int(LttEvent *e, LttField *f)
{
- gboolean reverse_byte_order = LTT_GET_BO(e->tracefile);
+ gboolean reverse_byte_order;
+ if(unlikely(f->field_type.network)) {
+ reverse_byte_order = (g_ntohs(0x1) != 0x1);
+ } else {
+ reverse_byte_order = LTT_GET_BO(e->tracefile);
+ }
switch(f->field_size) {
case 1:
float ltt_event_get_float(LttEvent *e, LttField *f)
{
- g_assert(LTT_HAS_FLOAT(e->tracefile));
- gboolean reverse_byte_order = LTT_GET_FLOAT_BO(e->tracefile);
+ gboolean reverse_byte_order;
+ if(unlikely(f->field_type.network)) {
+ reverse_byte_order = (g_ntohs(0x1) != 0x1);
+ } else {
+ g_assert(LTT_HAS_FLOAT(e->tracefile));
+ reverse_byte_order = LTT_GET_FLOAT_BO(e->tracefile);
+ }
g_assert(f->field_type.type_class == LTT_FLOAT && f->field_size == 4);
double ltt_event_get_double(LttEvent *e, LttField *f)
{
- g_assert(LTT_HAS_FLOAT(e->tracefile));
- gboolean reverse_byte_order = LTT_GET_FLOAT_BO(e->tracefile);
+ gboolean reverse_byte_order;
+ if(unlikely(f->field_type.network)) {
+ reverse_byte_order = (g_ntohs(0x1) != 0x1);
+ } else {
+ g_assert(LTT_HAS_FLOAT(e->tracefile));
+ reverse_byte_order = LTT_GET_FLOAT_BO(e->tracefile);
+ }
if(f->field_size == 4)
return ltt_event_get_float(e, f);
}
}
}
- lttv_attribute_find(self->parent.a, LTTV_STATE_HOOKS, LTTV_POINTER, &val);
+ lttv_attribute_find(ts->parent.a, LTTV_STATE_HOOKS, LTTV_POINTER, &val);
*(val.v_pointer) = hooks;
}
}
nb_trace = lttv_traceset_number(traceset);
for(i = 0 ; i < nb_trace ; i++) {
ts = LTTV_TRACE_STATE(self->parent.traces[i]);
- lttv_attribute_find(self->parent.a, LTTV_STATE_HOOKS, LTTV_POINTER, &val);
+ lttv_attribute_find(ts->parent.a, LTTV_STATE_HOOKS, LTTV_POINTER, &val);
hooks = *(val.v_pointer);
/* Remove these hooks from each event_by_id hooks list */