From a0618fb45de4cd048cc624be4ba3e1c10aa5d76d Mon Sep 17 00:00:00 2001 From: schnorr Date: Thu, 5 Aug 2010 11:06:16 +0000 Subject: [PATCH] FAQ updated with tracing options, change on the trace interface git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8114 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- doc/FAQ.doc | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/doc/FAQ.doc b/doc/FAQ.doc index d04b29efed..efa4d503f1 100644 --- a/doc/FAQ.doc +++ b/doc/FAQ.doc @@ -1773,11 +1773,9 @@ $ make \subsubsubsection Mandatory Functions -\li \c TRACE_start (const char *filename): This is the first function to -be called. It receives a single argument as parameter that contains the name of -the file that will hold the trace in the end of the simulation. It returns 0 if -everything was properly initialized, 1 otherwise. All trace functions called -before TRACE_start do nothing. +\li \c TRACE_start (): This is the first function to +be called. It returns 0 if everything was properly initialized, 1 otherwise. +All trace functions called before TRACE_start do nothing. \li \c TRACE_category (const char *category): This function should be used to define a user category. The category can be used to differentiate the tasks @@ -1814,6 +1812,27 @@ the value of this variable is always associated to the host. The host that will be used when these functions are called is the one returned by the function \c MSG_host_self(). +\subsubsection faq_tracing_options Tracing configuration Options + +These are the options accepted by the tracing system of SimGrid: + +\li \c tracing/filename: use this to specify the name of the trace file +that will be created during the simulation. For example, after the binary +of your simulator, you can pass as parameter this: +\verbatim +--cfg=tracing/filename:mytracefile.trace +\endverbatim +in order to trace the behavior of the simulation in a file with the name +mytracefile.trace. + +\li \c tracing/platform: use this to activate the tracing of the +platform. For example, you can pass as parameter to your simulator: +\verbatim +--cfg=tracing/platform:1 +\endverbatim +to trace the platform utilization by the categories you declared in your +simulator. By default, this options is set to 0. + \subsubsection faq_tracing_example Example of Instrumentation A simplified example using the tracing mandatory functions. @@ -1821,12 +1840,13 @@ A simplified example using the tracing mandatory functions. \verbatim int main (int argc, char **argv) { - TRACE_start ("traced_simulation.trace"); + MSG_global_init (&argc, &argv); + + //note that TRACE_start must be called after MSG_global_init + TRACE_start (); TRACE_category ("request"); TRACE_category ("computation"); TRACE_category ("finalize"); - - MSG_global_init (&argc, &argv); //(... after deployment ...) -- 2.20.1