X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttv%2Flttv%2Fsync%2Fevent_processing.h;h=1bc9ade3c1f0ebd8582820b29419c80972528879;hb=eb8e0e6fa27e4cfe25138d8275ee6f686ee2b32d;hp=d1ac7647ecf5b8210c5a87be9fef073bc6d25088;hpb=467066eeab8b0a4e5ea07d24f1840310730fd470;p=lttv.git diff --git a/lttv/lttv/sync/event_processing.h b/lttv/lttv/sync/event_processing.h index d1ac7647..1bc9ade3 100644 --- a/lttv/lttv/sync/event_processing.h +++ b/lttv/lttv/sync/event_processing.h @@ -1,19 +1,18 @@ /* This file is part of the Linux Trace Toolkit viewer - * Copyright (C) 2009 Benjamin Poirier + * Copyright (C) 2009, 2010 Benjamin Poirier * - * 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 free software: you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 2.1 of the License, or (at + * your option) any later version. * - * 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. + * 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 Lesser 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. + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . */ #ifndef EVENT_PROCESSING_H @@ -22,8 +21,6 @@ #include #include -#include - #include "data_structures.h" #include "graph_functions.h" @@ -34,13 +31,33 @@ typedef struct { char* name; - void (*initProcessing)(struct _SyncState* const syncStateLttv, - LttvTracesetContext* const traceSetContext); - void (*destroyProcessing)(struct _SyncState* const syncState); + /* + * This function is called at the beginning of a synchronization run for a + * set of traces. Allocate and initialize data structures for + * synchronizing a traceset. + */ + void (*initProcessing)(struct _SyncState* const syncStateLttv, ...); - void (*finalizeProcessing)(struct _SyncState* const syncState); + /* + * Obtain the factors from downstream. + */ + AllFactors* (*finalizeProcessing)(struct _SyncState* const syncState); + /* + * Print statistics related to processing. Is always called after + * finalizeProcessing. + */ void (*printProcessingStats)(struct _SyncState* const syncState); + + /* + * Deallocate processingData. No more functions may be called after this. + */ + void (*destroyProcessing)(struct _SyncState* const syncState); + + /* + * Write the processing-specific options and graph commands in the gnuplot + * script. Is always called after finalizeProcessing. + */ GraphFunctions graphFunctions; } ProcessingModule;