X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Fltt%2Fltt-private.h;h=f0c0d9572e72748a70bb70401f875c38ea8569d8;hb=18206708bafbba3198bfb82cca97f17d70a05666;hp=aeda9e4fae93e7a439595a261ea6f706d266bd6a;hpb=dd691a2ef3d6fdcba001206bf686a4cdce26b545;p=lttv.git diff --git a/ltt/branches/poly/ltt/ltt-private.h b/ltt/branches/poly/ltt/ltt-private.h index aeda9e4f..f0c0d957 100644 --- a/ltt/branches/poly/ltt/ltt-private.h +++ b/ltt/branches/poly/ltt/ltt-private.h @@ -1,3 +1,21 @@ +/* This file is part of the Linux Trace Toolkit viewer + * Copyright (C) 2003-2004 Xiangxiu Yang + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License Version 2 as + * published by the Free Software Foundation; + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, + * MA 02111-1307, USA. + */ + #ifndef LTT_PRIVATE_H #define LTT_PRIVATE_H @@ -105,6 +123,14 @@ struct _LttEvent{ void * data; //event data int which_block; //the current block of the event int which_event; //the position of the event + /* This is a workaround for fast position seek */ + void * last_event_pos; + + LttTime prev_block_end_time; //the end time of previous block + LttTime prev_event_time; //the time of the previous event + LttCycleCount pre_cycle_count; //previous cycle count of the event + int count; //the number of overflow of cycle count + /* end of workaround */ }; struct _LttFacility{ @@ -168,6 +194,15 @@ struct _LttEventPosition{ LttTracefile *tf; //tracefile containing the event gboolean old_position; //flag to show if it is the position //being remembered + /* This is a workaround for fast position seek */ + void * last_event_pos; + + LttTime prev_block_end_time; //the end time of previous block + LttTime prev_event_time; //the time of the previous event + LttEvent an_event; + LttCycleCount pre_cycle_count; //previous cycle count of the event + int count; //the number of overflow of cycle count + /* end of workaround */ }; /* The characteristics of the system on which the trace was obtained