From f2a74ed3fec31023600e9f24b318d9b9cc2c9a12 Mon Sep 17 00:00:00 2001 From: compudj Date: Thu, 11 Oct 2007 17:04:23 +0000 Subject: [PATCH] add missing config.h include git-svn-id: http://ltt.polymtl.ca/svn@2655 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/poly/ltt/event.c | 28 ++++++++++++++++++++++++++++ ltt/branches/poly/ltt/event.h | 6 ++---- ltt/branches/poly/ltt/marker.c | 25 +++++++++++++++++++++---- ltt/branches/poly/ltt/tracefile.c | 2 ++ 4 files changed, 53 insertions(+), 8 deletions(-) diff --git a/ltt/branches/poly/ltt/event.c b/ltt/branches/poly/ltt/event.c index 8d173340..f29a2914 100644 --- a/ltt/branches/poly/ltt/event.c +++ b/ltt/branches/poly/ltt/event.c @@ -1,3 +1,28 @@ +/* This file is part of the Linux Trace Toolkit viewer + * Copyright (C) 2007 Mathieu Desnoyers + * + * Complete rewrite from the original version made by XangXiu Yang. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License Version 2.1 as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include #include #include @@ -126,6 +151,9 @@ LttTracefile *ltt_event_position_tracefile(LttEventPosition *ep) guint32 ltt_event_get_unsigned(LttEvent *e, struct marker_field *f) { gboolean reverse_byte_order; + + g_warning("ltt size: %d", sizeof(LttTracefile)); + if(unlikely(f->attributes & LTT_ATTRIBUTE_NETWORK_BYTE_ORDER)) { reverse_byte_order = (g_ntohs(0x1) != 0x1); } else { diff --git a/ltt/branches/poly/ltt/event.h b/ltt/branches/poly/ltt/event.h index bc9452cf..697b400e 100644 --- a/ltt/branches/poly/ltt/event.h +++ b/ltt/branches/poly/ltt/event.h @@ -1,12 +1,12 @@ #ifndef _LTT_EVENT_H #define _LTT_EVENT_H -#include #include #include #include -#include #include +#include +#include #include /* @@ -109,6 +109,4 @@ static inline LttCycleCount ltt_event_cycle_count(const LttEvent *e) return e->tsc; } - - #endif //_LTT_EVENT_H diff --git a/ltt/branches/poly/ltt/marker.c b/ltt/branches/poly/ltt/marker.c index 3e2ab3d6..0ff55f45 100644 --- a/ltt/branches/poly/ltt/marker.c +++ b/ltt/branches/poly/ltt/marker.c @@ -1,10 +1,27 @@ -/* - * Marker support code. +/* This file is part of the Linux Trace Toolkit viewer + * Copyright (C) 2007 Mathieu Desnoyers + * + * Complete rewrite from the original version made by XangXiu Yang. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License Version 2.1 as published by the Free Software Foundation. * - * Mathieu Desnoyers, August 2007 - * License: LGPL. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include diff --git a/ltt/branches/poly/ltt/tracefile.c b/ltt/branches/poly/ltt/tracefile.c index 56b103b9..b026d4e2 100644 --- a/ltt/branches/poly/ltt/tracefile.c +++ b/ltt/branches/poly/ltt/tracefile.c @@ -246,6 +246,8 @@ int parse_trace_header(void *header, LttTracefile *tf, LttTrace *t) // t->compact_facilities = NULL; } + printf("init size : %d\n", sizeof(LttTracefile)); + switch(any->major_version) { -- 2.34.1