From: pmf Date: Tue, 27 Nov 2007 16:42:53 +0000 (+0000) Subject: sync frequency of all traces with the first loaded X-Git-Tag: v0.12.20~726 X-Git-Url: http://git.lttng.org/?a=commitdiff_plain;h=9c731a505cf0d0ded02f8e90a823fa90084c7740;p=lttv.git sync frequency of all traces with the first loaded this aligns traces of virtual machines with the parent git-svn-id: http://ltt.polymtl.ca/svn@2763 04897980-b3bd-0310-b5e0-8ef037075253 --- diff --git a/ltt/branches/poly/ltt/tracefile.c b/ltt/branches/poly/ltt/tracefile.c index d026cf91..2bb01629 100644 --- 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) +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); @@ -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); + 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),