X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Fltt%2Fltt.h;h=26bc04f52c657e4e4278c71ff68952d5286e41a4;hb=a970363f31999693ffbc0d7d6cf8a15d03677d64;hp=021173f966b2eae28d0976e9a31c6bf20e7c6227;hpb=c02ea99f196ff9bf99335fcf0cae4efc0e28f051;p=lttv.git diff --git a/ltt/branches/poly/ltt/ltt.h b/ltt/branches/poly/ltt/ltt.h index 021173f9..26bc04f5 100644 --- a/ltt/branches/poly/ltt/ltt.h +++ b/ltt/branches/poly/ltt/ltt.h @@ -1,5 +1,6 @@ /* This file is part of the Linux Trace Toolkit trace reading library * Copyright (C) 2003-2004 Michel Dagenais + * 2005 Mathieu Desnoyers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,8 +20,9 @@ #ifndef LTT_H #define LTT_H -#include #include +#include +#include /* A trace is associated with a tracing session run on a single, possibly multi-cpu, system. It is defined as a pathname to a directory containing @@ -66,27 +68,22 @@ contained information (byte offsets) may vary with the architecture associated to the trace. */ -typedef struct _LttTrace LttTrace; - -typedef struct _LttTracefile LttTracefile; - -typedef struct _LttFacility LttFacility; +#define NUM_FACILITIES 256 +#define FACILITIES_BITS 8 +#define AVG_EVENTS_PER_FACILITIES 10 -typedef struct _LttEventType LttEventType; +typedef struct LttTrace LttTrace; -typedef struct _LttType LttType; +typedef struct LttTracefile LttTracefile; -typedef struct _LttField LttField; - -typedef struct _LttEvent LttEvent; - -typedef struct _LttSystemDescription LttSystemDescription; +typedef struct LttSystemDescription LttSystemDescription; +typedef struct LttEvent LttEvent; /* Checksums are used to differentiate facilities which have the same name but differ. */ -typedef unsigned long LttChecksum; +//typedef guint32 LttChecksum; /* Events are usually stored with the easily obtained CPU clock cycle count, @@ -104,11 +101,10 @@ typedef struct _TimeInterval{ typedef guint64 LttCycleCount; - /* Event positions are used to seek within a tracefile based on the block number and event position within the block. */ -typedef struct _LttEventPosition LttEventPosition; +typedef struct LttEventPosition LttEventPosition; /* Differences between architectures include word sizes, endianess, @@ -126,9 +122,47 @@ typedef enum _LttArchEndian } LttArchEndian; typedef enum _LttTypeEnum -{ LTT_INT, LTT_UINT, LTT_FLOAT, LTT_STRING, LTT_ENUM, LTT_ARRAY, - LTT_SEQUENCE, LTT_STRUCT, LTT_UNION +{ LTT_INT_FIXED, + LTT_UINT_FIXED, + LTT_POINTER, + LTT_CHAR, + LTT_UCHAR, + LTT_SHORT, + LTT_USHORT, + LTT_INT, + LTT_UINT, + LTT_LONG, + LTT_ULONG, + LTT_SIZE_T, + LTT_SSIZE_T, + LTT_OFF_T, + LTT_FLOAT, + LTT_STRING, + LTT_ENUM, + LTT_ARRAY, + LTT_SEQUENCE, + LTT_STRUCT, + LTT_UNION, + LTT_NONE } LttTypeEnum; - + +/* Architecture types */ +#define LTT_ARCH_TYPE_I386 1 +#define LTT_ARCH_TYPE_PPC 2 +#define LTT_ARCH_TYPE_SH 3 +#define LTT_ARCH_TYPE_S390 4 +#define LTT_ARCH_TYPE_MIPS 5 +#define LTT_ARCH_TYPE_ARM 6 +#define LTT_ARCH_TYPE_PPC64 7 +#define LTT_ARCH_TYPE_X86_64 8 +#define LTT_ARCH_TYPE_C2 9 +#define LTT_ARCH_TYPE_POWERPC 10 +#define LTT_ARCH_TYPE_X86 11 + +/* Standard definitions for variants */ +#define LTT_ARCH_VARIANT_NONE 0 /* Main architecture implementation */ + + + #endif // LTT_H