X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttv%2Flttv%2Fsync%2Fgraph_functions.h;h=63077aa3380a0dfeb3dbd1ec530a205959941b39;hb=eb8e0e6fa27e4cfe25138d8275ee6f686ee2b32d;hp=d0b76948ee6e213530e75da7e497b58c34610acc;hpb=66eaf2eba602c331d08677dbb59ec3f9e40f0ccc;p=lttv.git diff --git a/lttv/lttv/sync/graph_functions.h b/lttv/lttv/sync/graph_functions.h index d0b76948..63077aa3 100644 --- a/lttv/lttv/sync/graph_functions.h +++ b/lttv/lttv/sync/graph_functions.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 GRAPH_FUNCTIONS_H @@ -28,18 +27,40 @@ typedef void (GraphFunction)(struct _SyncState* const syncState, const typedef struct { + /* + * These functions are called at the beginning of the gnuplot script and + * may writes variables that can be reused in the plot or options lines + */ GraphVariableFunction* writeVariables; - /* This is for graphs where the data on both axis is in the range of - * timestamps */ - GraphFunction* writeTraceTracePlots; + + /* + * All "Back" functions are called, then all "Fore" functions. They add + * graphs to a gnuplot "plot" command. All "Options" functions are called. + * They can set options via the gnuplot "set" command. Finaly, a replot is + * performed. This is done so that options may be set using dynamic + * gnuplot variables like GPVAL_X_MIN + */ + /* + * These next three functions ("writeTraceTrace...") are for graphs where + * both axes are in the scale of timestamps. + */ + GraphFunction* writeTraceTraceForePlots; + GraphFunction* writeTraceTraceBackPlots; GraphFunction* writeTraceTraceOptions; - /* This is for graphs where the data on the abscissa is in the range of - * timestamps and the ordinates is in the range of timestamp deltas */ - GraphFunction* writeTraceTimePlots; + + /* + * These next three functions ("writeTraceTime...") are for graphs where + * the abscissa are in the scale of timestamps and the ordinate in the + * scale of seconds. + */ + GraphFunction* writeTraceTimeForePlots; + GraphFunction* writeTraceTimeBackPlots; GraphFunction* writeTraceTimeOptions; } GraphFunctions; +FILE* createGraphsDir(const char* const graphsDir); +char* changeToGraphsDir(const char* const graphsDir); void writeGraphsScript(struct _SyncState* const syncState); #endif