1 /* This file is part of the Linux Trace Toolkit viewer
2 * Copyright (C) 2009 Benjamin Poirier <benjamin.poirier@polymtl.ca>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License Version 2 as
6 * published by the Free Software Foundation;
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
19 #define _ISOC99_SOURCE
25 #include <linux/if_ether.h>
27 #include <netinet/in.h>
32 #include "sync_chain_lttv.h"
33 #include "event_processing_lttng_common.h"
35 #include "event_processing_lttng_standard.h"
39 #define g_info(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, format)
43 // Functions common to all processing modules
44 static void initProcessingLTTVStandard(SyncState
* const syncState
,
45 LttvTracesetContext
* const traceSetContext
);
46 static void destroyProcessingLTTVStandard(SyncState
* const syncState
);
48 static void finalizeProcessingLTTVStandard(SyncState
* const syncState
);
49 static void printProcessingStatsLTTVStandard(SyncState
* const syncState
);
50 static void writeProcessingGraphsPlotsLTTVStandard(FILE* stream
, SyncState
*
51 const syncState
, const unsigned int i
, const unsigned int j
);
52 static void writeProcessingGraphsOptionsLTTVStandard(FILE* stream
, SyncState
*
53 const syncState
, const unsigned int i
, const unsigned int j
);
55 // Functions specific to this module
56 static void registerProcessingLTTVStandard() __attribute__((constructor (102)));
57 static gboolean
processEventLTTVStandard(void* hookData
, void* callData
);
58 static void partialDestroyProcessingLTTVStandard(SyncState
* const syncState
);
61 static ProcessingModule processingModuleLTTVStandard
= {
62 .name
= "LTTV-standard",
63 .initProcessing
= &initProcessingLTTVStandard
,
64 .destroyProcessing
= &destroyProcessingLTTVStandard
,
65 .finalizeProcessing
= &finalizeProcessingLTTVStandard
,
66 .printProcessingStats
= &printProcessingStatsLTTVStandard
,
67 .writeProcessingGraphsPlots
= &writeProcessingGraphsPlotsLTTVStandard
,
68 .writeProcessingGraphsOptions
= &writeProcessingGraphsOptionsLTTVStandard
,
74 * Processing Module registering function
76 static void registerProcessingLTTVStandard()
78 g_queue_push_tail(&processingModules
, &processingModuleLTTVStandard
);
85 * Allocate and initialize data structures for synchronizing a traceset.
86 * Register event hooks.
89 * syncState: container for synchronization data.
90 * This function allocates these processingData members:
95 * traceSetContext: set of LTTV traces
97 static void initProcessingLTTVStandard(SyncState
* const syncState
, LttvTracesetContext
*
98 const traceSetContext
)
101 ProcessingDataLTTVStandard
* processingData
;
103 processingData
= malloc(sizeof(ProcessingDataLTTVStandard
));
104 syncState
->processingData
= processingData
;
105 processingData
->traceSetContext
= traceSetContext
;
107 if (syncState
->stats
)
109 processingData
->stats
= calloc(1, sizeof(ProcessingStatsLTTVStandard
));
113 processingData
->stats
= NULL
;
116 processingData
->traceNumTable
= g_hash_table_new(&g_direct_hash
, NULL
);
117 processingData
->hookListList
= g_array_sized_new(FALSE
, FALSE
,
118 sizeof(GArray
*), syncState
->traceNb
);
119 processingData
->pendingRecv
= malloc(sizeof(GHashTable
*) *
122 for(i
= 0; i
< syncState
->traceNb
; i
++)
124 g_hash_table_insert(processingData
->traceNumTable
,
125 processingData
->traceSetContext
->traces
[i
]->t
, (gpointer
) i
);
128 for(i
= 0; i
< syncState
->traceNb
; i
++)
130 processingData
->pendingRecv
[i
]= g_hash_table_new_full(&g_direct_hash
,
131 NULL
, NULL
, &gdnDestroyEvent
);
134 registerHooks(processingData
->hookListList
, traceSetContext
,
135 &processEventLTTVStandard
, syncState
,
136 syncState
->matchingModule
->canMatch
);
141 * Call the partial processing destroyer, obtain and adjust the factors from
145 * syncState container for synchronization data.
147 static void finalizeProcessingLTTVStandard(SyncState
* const syncState
)
151 double minOffset
, minDrift
;
152 unsigned int refFreqTrace
;
153 ProcessingDataLTTVStandard
* processingData
;
155 processingData
= (ProcessingDataLTTVStandard
*) syncState
->processingData
;
157 partialDestroyProcessingLTTVStandard(syncState
);
159 factors
= syncState
->matchingModule
->finalizeMatching(syncState
);
161 /* The offsets are adjusted so the lowest one is 0. This is done because
162 * of a Lttv specific limitation: events cannot have negative times. By
163 * having non-negative offsets, events cannot be moved backwards to
167 for (i
= 0; i
< syncState
->traceNb
; i
++)
169 minOffset
= MIN(g_array_index(factors
, Factors
, i
).offset
, minOffset
);
172 for (i
= 0; i
< syncState
->traceNb
; i
++)
174 g_array_index(factors
, Factors
, i
).offset
-= minOffset
;
177 /* Because the timestamps are corrected at the TSC level (not at the
178 * LttTime level) all trace frequencies must be made equal. We choose to
179 * use the frequency of the system with the lowest drift
183 for (i
= 0; i
< syncState
->traceNb
; i
++)
185 if (g_array_index(factors
, Factors
, i
).drift
< minDrift
)
187 minDrift
= g_array_index(factors
, Factors
, i
).drift
;
191 g_assert(syncState
->traceNb
== 0 || minDrift
!= INFINITY
);
193 // Write the factors to the LttTrace structures
194 for (i
= 0; i
< syncState
->traceNb
; i
++)
197 Factors
* traceFactors
;
199 t
= processingData
->traceSetContext
->traces
[i
]->t
;
200 traceFactors
= &g_array_index(factors
, Factors
, i
);
202 t
->drift
= traceFactors
->drift
;
203 t
->offset
= traceFactors
->offset
;
205 processingData
->traceSetContext
->traces
[refFreqTrace
]->t
->start_freq
;
207 processingData
->traceSetContext
->traces
[refFreqTrace
]->t
->freq_scale
;
208 t
->start_time_from_tsc
=
209 ltt_time_from_uint64(tsc_to_uint64(t
->freq_scale
, t
->start_freq
,
210 t
->drift
* t
->start_tsc
+ t
->offset
));
213 g_array_free(factors
, TRUE
);
215 lttv_traceset_context_compute_time_span(processingData
->traceSetContext
,
216 &processingData
->traceSetContext
->time_span
);
218 g_debug("traceset start %ld.%09ld end %ld.%09ld\n",
219 processingData
->traceSetContext
->time_span
.start_time
.tv_sec
,
220 processingData
->traceSetContext
->time_span
.start_time
.tv_nsec
,
221 processingData
->traceSetContext
->time_span
.end_time
.tv_sec
,
222 processingData
->traceSetContext
->time_span
.end_time
.tv_nsec
);
227 * Print statistics related to processing and downstream modules. Must be
228 * called after finalizeProcessing.
231 * syncState container for synchronization data.
233 static void printProcessingStatsLTTVStandard(SyncState
* const syncState
)
236 ProcessingDataLTTVStandard
* processingData
;
238 if (!syncState
->stats
)
243 processingData
= (ProcessingDataLTTVStandard
*) syncState
->processingData
;
245 printf("LTTV processing stats:\n");
246 printf("\treceived frames: %d\n", processingData
->stats
->totRecv
);
247 printf("\treceived frames that are IP: %d\n",
248 processingData
->stats
->totRecvIp
);
249 if (syncState
->matchingModule
->canMatch
[TCP
])
251 printf("\treceived and processed packets that are TCP: %d\n",
252 processingData
->stats
->totRecvTCP
);
254 if (syncState
->matchingModule
->canMatch
[UDP
])
256 printf("\treceived and processed packets that are UDP: %d\n",
257 processingData
->stats
->totRecvUDP
);
259 if (syncState
->matchingModule
->canMatch
[TCP
])
261 printf("\tsent packets that are TCP: %d\n",
262 processingData
->stats
->totOutE
);
265 if (syncState
->matchingModule
->printMatchingStats
!= NULL
)
267 syncState
->matchingModule
->printMatchingStats(syncState
);
270 printf("Resulting synchronization factors:\n");
271 for (i
= 0; i
< syncState
->traceNb
; i
++)
275 t
= processingData
->traceSetContext
->traces
[i
]->t
;
277 printf("\ttrace %u drift= %g offset= %g (%f) start time= %ld.%09ld\n",
278 i
, t
->drift
, t
->offset
, (double) tsc_to_uint64(t
->freq_scale
,
279 t
->start_freq
, t
->offset
) / NANOSECONDS_PER_SECOND
,
280 t
->start_time_from_tsc
.tv_sec
, t
->start_time_from_tsc
.tv_nsec
);
286 * Unregister event hooks. Deallocate processingData.
289 * syncState: container for synchronization data.
290 * This function deallocates these processingData members:
293 static void destroyProcessingLTTVStandard(SyncState
* const syncState
)
295 ProcessingDataLTTVStandard
* processingData
;
297 processingData
= (ProcessingDataLTTVStandard
*) syncState
->processingData
;
299 if (processingData
== NULL
)
304 partialDestroyProcessingLTTVStandard(syncState
);
306 if (syncState
->stats
)
308 free(processingData
->stats
);
311 free(syncState
->processingData
);
312 syncState
->processingData
= NULL
;
317 * Unregister event hooks. Deallocate some of processingData.
319 * This function can be called right after the events have been processed to
320 * free some data structures that are not needed for finalization.
323 * syncState: container for synchronization data.
324 * This function deallocates these members:
329 static void partialDestroyProcessingLTTVStandard(SyncState
* const syncState
)
332 ProcessingDataLTTVStandard
* processingData
;
334 processingData
= (ProcessingDataLTTVStandard
*) syncState
->processingData
;
336 if (processingData
== NULL
|| processingData
->traceNumTable
== NULL
)
341 g_hash_table_destroy(processingData
->traceNumTable
);
342 processingData
->traceNumTable
= NULL
;
344 for(i
= 0; i
< syncState
->traceNb
; i
++)
347 g_debug("Cleaning up pendingRecv list\n");
348 g_hash_table_destroy(processingData
->pendingRecv
[i
]);
350 free(processingData
->pendingRecv
);
352 unregisterHooks(processingData
->hookListList
,
353 processingData
->traceSetContext
);
358 * Lttv hook function that will be called for network events
361 * hookData: LttvTraceHook* for the type of event that generated the call
362 * callData: LttvTracefileContext* at the moment of the event
365 * FALSE Always returns FALSE, meaning to keep processing hooks for
368 static gboolean
processEventLTTVStandard(void* hookData
, void* callData
)
370 LttvTraceHook
* traceHook
;
371 LttvTracefileContext
* tfc
;
376 unsigned long traceNum
;
377 struct marker_info
* info
;
378 SyncState
* syncState
;
379 ProcessingDataLTTVStandard
* processingData
;
381 traceHook
= (LttvTraceHook
*) hookData
;
382 tfc
= (LttvTracefileContext
*) callData
;
383 syncState
= (SyncState
*) traceHook
->hook_data
;
384 processingData
= (ProcessingDataLTTVStandard
*) syncState
->processingData
;
385 event
= ltt_tracefile_get_event(tfc
->tf
);
386 time
= ltt_event_time(event
);
387 tsc
= ltt_event_cycle_count(event
);
388 trace
= tfc
->t_context
->t
;
389 info
= marker_get_info_from_id(tfc
->tf
->mdata
, event
->event_id
);
391 g_assert(g_hash_table_lookup_extended(processingData
->traceNumTable
,
392 trace
, NULL
, (gpointer
*) &traceNum
));
394 g_debug("XXXX process event: time: %ld.%09ld trace: %ld (%p) name: %s ",
395 (long) time
.tv_sec
, time
.tv_nsec
, traceNum
, trace
,
396 g_quark_to_string(info
->name
));
398 if (info
->name
== LTT_EVENT_DEV_XMIT_EXTENDED
)
402 if (!ltt_event_get_unsigned(event
,
403 lttv_trace_get_hook_field(traceHook
, 1)) == ETH_P_IP
||
404 !ltt_event_get_unsigned(event
,
405 lttv_trace_get_hook_field(traceHook
, 2)) == IPPROTO_TCP
)
410 if (!syncState
->matchingModule
->canMatch
[TCP
])
415 if (syncState
->stats
)
417 processingData
->stats
->totOutE
++;
420 outE
= malloc(sizeof(Event
));
421 outE
->traceNum
= traceNum
;
424 outE
->destroy
= &destroyTCPEvent
;
425 outE
->event
.tcpEvent
= malloc(sizeof(TCPEvent
));
426 outE
->event
.tcpEvent
->direction
= OUT
;
427 outE
->event
.tcpEvent
->segmentKey
= malloc(sizeof(SegmentKey
));
428 outE
->event
.tcpEvent
->segmentKey
->connectionKey
.saddr
=
429 ltt_event_get_unsigned(event
, lttv_trace_get_hook_field(traceHook
,
431 outE
->event
.tcpEvent
->segmentKey
->connectionKey
.daddr
=
432 ltt_event_get_unsigned(event
, lttv_trace_get_hook_field(traceHook
,
434 outE
->event
.tcpEvent
->segmentKey
->tot_len
=
435 ltt_event_get_unsigned(event
, lttv_trace_get_hook_field(traceHook
,
437 outE
->event
.tcpEvent
->segmentKey
->ihl
= ltt_event_get_unsigned(event
,
438 lttv_trace_get_hook_field(traceHook
, 6));
439 outE
->event
.tcpEvent
->segmentKey
->connectionKey
.source
=
440 ltt_event_get_unsigned(event
, lttv_trace_get_hook_field(traceHook
,
442 outE
->event
.tcpEvent
->segmentKey
->connectionKey
.dest
=
443 ltt_event_get_unsigned(event
, lttv_trace_get_hook_field(traceHook
,
445 outE
->event
.tcpEvent
->segmentKey
->seq
= ltt_event_get_unsigned(event
,
446 lttv_trace_get_hook_field(traceHook
, 9));
447 outE
->event
.tcpEvent
->segmentKey
->ack_seq
=
448 ltt_event_get_unsigned(event
, lttv_trace_get_hook_field(traceHook
,
450 outE
->event
.tcpEvent
->segmentKey
->doff
= ltt_event_get_unsigned(event
,
451 lttv_trace_get_hook_field(traceHook
, 11));
452 outE
->event
.tcpEvent
->segmentKey
->ack
= ltt_event_get_unsigned(event
,
453 lttv_trace_get_hook_field(traceHook
, 12));
454 outE
->event
.tcpEvent
->segmentKey
->rst
= ltt_event_get_unsigned(event
,
455 lttv_trace_get_hook_field(traceHook
, 13));
456 outE
->event
.tcpEvent
->segmentKey
->syn
= ltt_event_get_unsigned(event
,
457 lttv_trace_get_hook_field(traceHook
, 14));
458 outE
->event
.tcpEvent
->segmentKey
->fin
= ltt_event_get_unsigned(event
,
459 lttv_trace_get_hook_field(traceHook
, 15));
461 syncState
->matchingModule
->matchEvent(syncState
, outE
);
463 g_debug("Output event done\n");
465 else if (info
->name
== LTT_EVENT_DEV_RECEIVE
)
469 if (syncState
->stats
)
471 processingData
->stats
->totRecv
++;
474 protocol
= ltt_event_get_unsigned(event
,
475 lttv_trace_get_hook_field(traceHook
, 1));
477 if (protocol
== ETH_P_IP
)
482 if (syncState
->stats
)
484 processingData
->stats
->totRecvIp
++;
487 inE
= malloc(sizeof(Event
));
488 inE
->traceNum
= traceNum
;
490 inE
->event
.tcpEvent
= NULL
;
491 inE
->destroy
= &destroyEvent
;
493 skb
= (void*) (long) ltt_event_get_long_unsigned(event
,
494 lttv_trace_get_hook_field(traceHook
, 0));
495 g_hash_table_replace(processingData
->pendingRecv
[traceNum
], skb
,
498 g_debug("Adding inE %p for skb %p to pendingRecv\n", inE
, skb
);
505 else if (info
->name
== LTT_EVENT_TCPV4_RCV_EXTENDED
)
510 // Search pendingRecv for an event with the same skb
511 skb
= (void*) (long) ltt_event_get_long_unsigned(event
,
512 lttv_trace_get_hook_field(traceHook
, 0));
515 g_hash_table_lookup(processingData
->pendingRecv
[traceNum
], skb
);
518 // This should only happen in case of lost events
519 g_warning("No matching pending receive event found");
523 if (syncState
->stats
)
525 processingData
->stats
->totRecvTCP
++;
528 // If it's there, remove it and proceed with a receive event
529 g_hash_table_steal(processingData
->pendingRecv
[traceNum
], skb
);
532 inE
->event
.tcpEvent
= malloc(sizeof(TCPEvent
));
533 inE
->destroy
= &destroyTCPEvent
;
534 inE
->event
.tcpEvent
->direction
= IN
;
535 inE
->event
.tcpEvent
->segmentKey
= malloc(sizeof(SegmentKey
));
536 inE
->event
.tcpEvent
->segmentKey
->connectionKey
.saddr
=
537 ltt_event_get_unsigned(event
,
538 lttv_trace_get_hook_field(traceHook
, 1));
539 inE
->event
.tcpEvent
->segmentKey
->connectionKey
.daddr
=
540 ltt_event_get_unsigned(event
,
541 lttv_trace_get_hook_field(traceHook
, 2));
542 inE
->event
.tcpEvent
->segmentKey
->tot_len
=
543 ltt_event_get_unsigned(event
,
544 lttv_trace_get_hook_field(traceHook
, 3));
545 inE
->event
.tcpEvent
->segmentKey
->ihl
=
546 ltt_event_get_unsigned(event
,
547 lttv_trace_get_hook_field(traceHook
, 4));
548 inE
->event
.tcpEvent
->segmentKey
->connectionKey
.source
=
549 ltt_event_get_unsigned(event
,
550 lttv_trace_get_hook_field(traceHook
, 5));
551 inE
->event
.tcpEvent
->segmentKey
->connectionKey
.dest
=
552 ltt_event_get_unsigned(event
,
553 lttv_trace_get_hook_field(traceHook
, 6));
554 inE
->event
.tcpEvent
->segmentKey
->seq
=
555 ltt_event_get_unsigned(event
,
556 lttv_trace_get_hook_field(traceHook
, 7));
557 inE
->event
.tcpEvent
->segmentKey
->ack_seq
=
558 ltt_event_get_unsigned(event
,
559 lttv_trace_get_hook_field(traceHook
, 8));
560 inE
->event
.tcpEvent
->segmentKey
->doff
=
561 ltt_event_get_unsigned(event
,
562 lttv_trace_get_hook_field(traceHook
, 9));
563 inE
->event
.tcpEvent
->segmentKey
->ack
=
564 ltt_event_get_unsigned(event
,
565 lttv_trace_get_hook_field(traceHook
, 10));
566 inE
->event
.tcpEvent
->segmentKey
->rst
=
567 ltt_event_get_unsigned(event
,
568 lttv_trace_get_hook_field(traceHook
, 11));
569 inE
->event
.tcpEvent
->segmentKey
->syn
=
570 ltt_event_get_unsigned(event
,
571 lttv_trace_get_hook_field(traceHook
, 12));
572 inE
->event
.tcpEvent
->segmentKey
->fin
=
573 ltt_event_get_unsigned(event
,
574 lttv_trace_get_hook_field(traceHook
, 13));
576 syncState
->matchingModule
->matchEvent(syncState
, inE
);
578 g_debug("TCP input event %p for skb %p done\n", inE
, skb
);
581 else if (info
->name
== LTT_EVENT_UDPV4_RCV_EXTENDED
)
586 // Search pendingRecv for an event with the same skb
587 skb
= (void*) (long) ltt_event_get_long_unsigned(event
,
588 lttv_trace_get_hook_field(traceHook
, 0));
591 g_hash_table_lookup(processingData
->pendingRecv
[traceNum
], skb
);
594 // This should only happen in case of lost events
595 g_warning("No matching pending receive event found");
601 if (syncState
->stats
)
603 processingData
->stats
->totRecvUDP
++;
606 // If it's there, remove it and proceed with a receive event
607 g_hash_table_steal(processingData
->pendingRecv
[traceNum
], skb
);
610 inE
->event
.udpEvent
= malloc(sizeof(UDPEvent
));
611 inE
->destroy
= &destroyUDPEvent
;
612 inE
->event
.udpEvent
->direction
= IN
;
613 inE
->event
.udpEvent
->datagramKey
= malloc(sizeof(DatagramKey
));
614 inE
->event
.udpEvent
->datagramKey
->saddr
=
615 ltt_event_get_unsigned(event
,
616 lttv_trace_get_hook_field(traceHook
, 1));
617 inE
->event
.udpEvent
->datagramKey
->daddr
=
618 ltt_event_get_unsigned(event
,
619 lttv_trace_get_hook_field(traceHook
, 2));
620 inE
->event
.udpEvent
->unicast
= ltt_event_get_unsigned(event
,
621 lttv_trace_get_hook_field(traceHook
, 3)) == 0 ? false : true;
622 inE
->event
.udpEvent
->datagramKey
->ulen
=
623 ltt_event_get_unsigned(event
,
624 lttv_trace_get_hook_field(traceHook
, 4));
625 inE
->event
.udpEvent
->datagramKey
->source
=
626 ltt_event_get_unsigned(event
,
627 lttv_trace_get_hook_field(traceHook
, 5));
628 inE
->event
.udpEvent
->datagramKey
->dest
=
629 ltt_event_get_unsigned(event
,
630 lttv_trace_get_hook_field(traceHook
, 6));
631 dataStart
= ltt_event_get_long_unsigned(event
,
632 lttv_trace_get_hook_field(traceHook
, 7));
633 g_assert_cmpuint(sizeof(inE
->event
.udpEvent
->datagramKey
->dataKey
),
634 ==, sizeof(guint64
));
635 if (inE
->event
.udpEvent
->datagramKey
->ulen
- 8 >=
636 sizeof(inE
->event
.udpEvent
->datagramKey
->dataKey
))
638 memcpy(inE
->event
.udpEvent
->datagramKey
->dataKey
, &dataStart
,
639 sizeof(inE
->event
.udpEvent
->datagramKey
->dataKey
));
643 memset(inE
->event
.udpEvent
->datagramKey
->dataKey
, 0,
644 sizeof(inE
->event
.udpEvent
->datagramKey
->dataKey
));
645 memcpy(inE
->event
.udpEvent
->datagramKey
->dataKey
, &dataStart
,
646 inE
->event
.udpEvent
->datagramKey
->ulen
- 8);
649 syncState
->matchingModule
->matchEvent(syncState
, inE
);
651 g_debug("UDP input event %p for skb %p done\n", inE
, skb
);
656 g_assert_not_reached();
664 * Write the processing-specific graph lines in the gnuplot script (none at
665 * the moment). Call the downstream module's graph function.
668 * stream: stream where to write the data
669 * syncState: container for synchronization data
670 * i: first trace number
671 * j: second trace number, garanteed to be larger than i
673 static void writeProcessingGraphsPlotsLTTVStandard(FILE* stream
, SyncState
*
674 const syncState
, const unsigned int i
, const unsigned int j
)
676 if (syncState
->matchingModule
->writeMatchingGraphsPlots
!= NULL
)
678 syncState
->matchingModule
->writeMatchingGraphsPlots(stream
, syncState
,
685 * Write the processing-specific options in the gnuplot script. Call the
686 * downstream module's options function.
689 * stream: stream where to write the data
690 * syncState: container for synchronization data
691 * i: first trace number
692 * j: second trace number, garanteed to be larger than i
694 static void writeProcessingGraphsOptionsLTTVStandard(FILE* stream
, SyncState
*
695 const syncState
, const unsigned int i
, const unsigned int j
)
697 ProcessingDataLTTVStandard
* processingData
;
698 LttTrace
* traceI
, * traceJ
;
700 processingData
= (ProcessingDataLTTVStandard
*) syncState
->processingData
;
702 traceI
= processingData
->traceSetContext
->traces
[i
]->t
;
703 traceJ
= processingData
->traceSetContext
->traces
[j
]->t
;
706 "set x2label \"Clock %1$d (s)\"\n"
707 "set x2range [GPVAL_X_MIN / %2$.1f : GPVAL_X_MAX / %2$.1f]\n"
709 "set y2label \"Clock %3$d (s)\"\n"
710 "set y2range [GPVAL_Y_MIN / %4$.1f : GPVAL_Y_MAX / %4$.1f]\n"
711 "set y2tics\n", i
, (double) traceI
->start_freq
/ traceI
->freq_scale
,
712 j
, (double) traceJ
->start_freq
/ traceJ
->freq_scale
);
714 if (syncState
->matchingModule
->writeMatchingGraphsOptions
!= NULL
)
716 syncState
->matchingModule
->writeMatchingGraphsOptions(stream
,