Move and update documentation
[lttv.git] / lttv / lttv / sync / event_matching.h
CommitLineData
70407e86 1/* This file is part of the Linux Trace Toolkit viewer
277e5b53 2 * Copyright (C) 2009, 2010 Benjamin Poirier <benjamin.poirier@polymtl.ca>
70407e86 3 *
277e5b53
BP
4 * This program is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation, either version 2.1 of the License, or (at
7 * your option) any later version.
70407e86 8 *
277e5b53
BP
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
12 * License for more details.
70407e86 13 *
277e5b53
BP
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
70407e86
BP
16 */
17
18#ifndef EVENT_MATCHING_H
19#define EVENT_MATCHING_H
20
21#include <glib.h>
22
10341d26 23#include "data_structures.h"
467066ee 24#include "graph_functions.h"
70407e86
BP
25
26struct _SyncState;
27
28typedef struct
29{
30 char* name;
f6691532 31 bool canMatch[TYPE_COUNT];
70407e86 32
eb8e0e6f
BP
33 /*
34 * This function is called at the beginning of a synchronization run for a set
35 * of traces. Allocate the matching specific data structures.
36 */
70407e86 37 void (*initMatching)(struct _SyncState* const syncState);
eb8e0e6f
BP
38
39 /*
40 * Free the matching specific data structures.
41 */
70407e86
BP
42 void (*destroyMatching)(struct _SyncState* const syncState);
43
eb8e0e6f
BP
44 /*
45 * Try to match one event from a trace with the corresponding event from
46 * another trace. If it is possible, create a new structure and call the
47 * analyse{message,exchange,broadcast} function of the analysis module.
48 */
10341d26
BP
49 void (*matchEvent)(struct _SyncState* const syncState, Event* const
50 event);
eb8e0e6f
BP
51
52 /*
53 * Obtain the factors from downstream.
54 */
0a87ec9a 55 AllFactors* (*finalizeMatching)(struct _SyncState* const syncState);
467066ee 56
eb8e0e6f
BP
57 /*
58 * Print statistics related to matching. Is always called after
59 * finalizeMatching.
60 */
70407e86 61 void (*printMatchingStats)(struct _SyncState* const syncState);
eb8e0e6f
BP
62
63 /*
64 * Write the matching-specific options and graph commands in the gnuplot
65 * script. Is always called after finalizeMatching.
66 */
467066ee 67 GraphFunctions graphFunctions;
70407e86
BP
68} MatchingModule;
69
70#endif
This page took 0.026718 seconds and 4 git commands to generate.