projects
/
lttv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update version
[lttv.git]
/
ltt
/
branches
/
poly
/
ltt
/
tracefile.c
diff --git
a/ltt/branches/poly/ltt/tracefile.c
b/ltt/branches/poly/ltt/tracefile.c
index ec3bc4da5e503b29032893c86af0fdfda51d7e73..cfe76e10c44a6444d0a82304c1811f860ecacd2a 100644
(file)
--- a/
ltt/branches/poly/ltt/tracefile.c
+++ b/
ltt/branches/poly/ltt/tracefile.c
@@
-76,6
+76,8
@@
GQuark LTT_TRACEFILE_NAME_FACILITIES;
#define PAGE_MASK (~(page_size-1))
#define PAGE_ALIGN(addr) (((addr)+page_size-1)&PAGE_MASK)
#define PAGE_MASK (~(page_size-1))
#define PAGE_ALIGN(addr) (((addr)+page_size-1)&PAGE_MASK)
+LttTrace *father_trace = NULL;
+
/* set the offset of the fields belonging to the event,
need the information of the archecture */
//void set_fields_offsets(LttTracefile *tf, LttEventType *event_type);
/* set the offset of the fields belonging to the event,
need the information of the archecture */
//void set_fields_offsets(LttTracefile *tf, LttEventType *event_type);
@@
-283,6
+285,13
@@
int parse_trace_header(void *header, LttTracefile *tf, LttTrace *t)
&vheader->start_freq);
t->freq_scale = ltt_get_uint32(LTT_GET_BO(tf),
&vheader->freq_scale);
&vheader->start_freq);
t->freq_scale = ltt_get_uint32(LTT_GET_BO(tf),
&vheader->freq_scale);
+ if(father_trace) {
+ t->start_freq = father_trace->start_freq;
+ t->freq_scale = father_trace->freq_scale;
+ }
+ else {
+ father_trace = t;
+ }
t->start_tsc = ltt_get_uint64(LTT_GET_BO(tf),
&vheader->start_tsc);
t->start_monotonic = ltt_get_uint64(LTT_GET_BO(tf),
t->start_tsc = ltt_get_uint64(LTT_GET_BO(tf),
&vheader->start_tsc);
t->start_monotonic = ltt_get_uint64(LTT_GET_BO(tf),
@@
-368,7
+377,7
@@
gint ltt_tracefile_open(LttTrace *t, gchar * fileName, LttTracefile *tf)
perror("Error in allocating memory for buffer of tracefile");
goto close_file;
}
perror("Error in allocating memory for buffer of tracefile");
goto close_file;
}
- g_assert( ( (gu
int
)tf->buffer.head&(8-1) ) == 0); // make sure it's aligned.
+ g_assert( ( (gu
long
)tf->buffer.head&(8-1) ) == 0); // make sure it's aligned.
header = (struct ltt_block_start_header*)tf->buffer.head;
header = (struct ltt_block_start_header*)tf->buffer.head;
@@
-669,8
+678,8
@@
void get_absolute_pathname(const gchar *pathname, gchar * abs_pathname)
int get_tracefile_name_number(gchar *raw_name,
GQuark *name,
guint *num,
int get_tracefile_name_number(gchar *raw_name,
GQuark *name,
guint *num,
- gu
int
*tid,
- gu
int
*pgid,
+ gu
long
*tid,
+ gu
long
*pgid,
guint64 *creation)
{
guint raw_name_len = strlen(raw_name);
guint64 *creation)
{
guint raw_name_len = strlen(raw_name);
@@
-881,10
+890,12
@@
int open_tracefiles(LttTrace *trace, gchar *root_path, gchar *relative_path)
if(ret < 0) continue;
} else if(S_ISREG(stat_buf.st_mode)) {
GQuark name;
if(ret < 0) continue;
} else if(S_ISREG(stat_buf.st_mode)) {
GQuark name;
- guint num, tid, pgid;
+ guint num;
+ gulong tid, pgid;
guint64 creation;
GArray *group;
guint64 creation;
GArray *group;
- num = tid = pgid = 0;
+ num = 0;
+ tid = pgid = 0;
creation = 0;
if(get_tracefile_name_number(rel_path, &name, &num, &tid, &pgid, &creation))
continue; /* invalid name */
creation = 0;
if(get_tracefile_name_number(rel_path, &name, &num, &tid, &pgid, &creation))
continue; /* invalid name */
@@
-1866,7
+1877,7
@@
int ltt_tracefile_read_update_event(LttTracefile *tf)
event->event_time = ltt_interpolate_time(tf, event);
if(!tf->compact) {
event->event_time = ltt_interpolate_time(tf, event);
if(!tf->compact) {
- event->event_id =
*(guint16*)pos
;
+ event->event_id =
ltt_get_uint16(LTT_GET_BO(tf), pos)
;
pos += sizeof(guint16);
event->event_size = ltt_get_uint16(LTT_GET_BO(tf), pos);
pos += sizeof(guint16);
event->event_size = ltt_get_uint16(LTT_GET_BO(tf), pos);
@@
-1933,7
+1944,7
@@
gint map_block(LttTracefile * tf, guint block_num)
g_assert(0);
goto map_error;
}
g_assert(0);
goto map_error;
}
- g_assert( ( (gu
int
)tf->buffer.head&(8-1) ) == 0); // make sure it's aligned.
+ g_assert( ( (gu
long
)tf->buffer.head&(8-1) ) == 0); // make sure it's aligned.
tf->buffer.index = block_num;
tf->buffer.index = block_num;
This page took
0.023543 seconds
and
4
git commands to generate.