1 /* Copyright (c) 2010. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
7 #include "simgrid_config.h"
10 #include "instr/instr_private.h"
11 #include "surf/network_private.h"
20 XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_api, instr, "API");
22 /** \ingroup TRACE_category
23 * \brief Declare a new category with a random color.
25 * This function should be used to define a user category. The
26 * category can be used to differentiate the tasks that are created
27 * during the simulation (for example, tasks from server1, server2,
28 * or request tasks, computation tasks, communication tasks). All
29 * resource utilization (host power and link bandwidth) will be
30 * classified according to the task category. Tasks that do not
31 * belong to a category are not traced. The color for the category
32 * that is being declared is random. This function has no effect
33 * if a category with the same name has been already declared.
35 * See \ref tracing_tracing for details on how to trace
36 * the (categorized) resource utilization.
38 * \param category The name of the new tracing category to be created.
40 * \see TRACE_category_with_color, MSG_task_set_category, SD_task_set_category
42 void TRACE_category(const char *category)
44 TRACE_category_with_color (category, NULL);
47 /** \ingroup TRACE_category
48 * \brief Declare a new category with a color.
50 * Same as #TRACE_category, but let user specify a color encoded as a
51 * RGB-like string with three floats from 0 to 1. So, to specify a
52 * red color, pass "1 0 0" as color parameter. A light-gray color
53 * can be specified using "0.7 0.7 0.7" as color. This function has
54 * no effect if a category with the same name has been already declared.
56 * See \ref tracing_tracing for details on how to trace
57 * the (categorized) resource utilization.
59 * \param category The name of the new tracing category to be created.
60 * \param color The color of the category (see \ref tracing_tracing to
61 * know how to correctly specify the color)
63 * \see MSG_task_set_category, SD_task_set_category
65 void TRACE_category_with_color (const char *category, const char *color)
68 if (!TRACE_is_enabled()) return;
70 if (!(TRACE_categorized() && category != NULL)) return;
72 /* if platform is not traced, we can't deal with categories */
73 if (!TRACE_needs_platform()) return;
75 //check if category is already created
76 char *created = xbt_dict_get_or_null(created_categories, category);
78 xbt_dict_set (created_categories, category, xbt_strdup("1"), NULL);
81 char final_color[INSTR_DEFAULT_STR_SIZE];
83 //generate a random color
84 double red = drand48();
85 double green = drand48();
86 double blue = drand48();
87 snprintf (final_color, INSTR_DEFAULT_STR_SIZE, "%f %f %f", red, green, blue);
89 snprintf (final_color, INSTR_DEFAULT_STR_SIZE, "%s", color);
92 XBT_DEBUG("CAT,declare %s, %s", category, final_color);
94 //define the type of this category on top of hosts and links
95 instr_new_variable_type (category, final_color);
99 /** \ingroup TRACE_category
100 * \brief Get declared categories
102 * This function should be used to get categories that were already
103 * declared with #TRACE_category or with #TRACE_category_with_color.
105 * See \ref tracing_tracing for details on how to trace
106 * the (categorized) resource utilization.
108 * \return A dynar with the declared categories, must be freed with xbt_dynar_free.
110 * \see MSG_task_set_category, SD_task_set_category
112 xbt_dynar_t TRACE_get_categories (void)
114 if (!TRACE_is_enabled()) return NULL;
115 if (!TRACE_categorized()) return NULL;
117 xbt_dynar_t ret = xbt_dynar_new (sizeof(char*), &xbt_free_ref);
118 xbt_dict_cursor_t cursor = NULL;
120 xbt_dict_foreach(created_categories, cursor, name, value) {
121 xbt_dynar_push_as (ret, char*, xbt_strdup(name));
126 /** \ingroup TRACE_mark
127 * \brief Declare a new type for tracing mark.
129 * This function declares a new Paje event
130 * type in the trace file that can be used by
131 * simulators to declare application-level
132 * marks. This function is independent of
133 * which API is used in SimGrid.
135 * \param mark_type The name of the new type.
139 void TRACE_declare_mark(const char *mark_type)
142 if (!TRACE_is_enabled()) return;
144 if (!mark_type) return;
146 XBT_DEBUG("MARK,declare %s", mark_type);
147 PJ_type_event_new(mark_type, NULL, PJ_type_get_root());
151 * \ingroup TRACE_mark
152 * \brief Create a new instance of a tracing mark type.
154 * This function creates a mark in the trace file. The
155 * first parameter had to be previously declared using
156 * #TRACE_declare_mark, the second is the identifier
157 * for this mark instance. We recommend that the
158 * mark_value is a unique value for the whole simulation.
159 * Nevertheless, this is not a strong requirement: the
160 * trace will be valid even if there are multiple mark
161 * identifiers for the same trace.
163 * \param mark_type The name of the type for which the new instance will belong.
164 * \param mark_value The name of the new instance mark.
166 * \see TRACE_declare_mark
168 void TRACE_mark(const char *mark_type, const char *mark_value)
171 if (!TRACE_is_enabled()) return;
173 if (!mark_type || !mark_value) return;
175 XBT_DEBUG("MARK %s %s", mark_type, mark_value);
176 type_t type = PJ_type_get (mark_type, PJ_type_get_root());
178 THROWF (tracing_error, 1, "mark_type with name (%s) not declared before", mark_type);
180 val_t value = PJ_value_get (mark_value, type);
182 value = PJ_value_new (mark_value, NULL, type);
184 new_pajeNewEvent (MSG_get_clock(), PJ_container_get_root(), type, value);
187 static void instr_user_variable(double time,
188 const char *resource,
189 const char *variable,
190 const char *father_type,
192 InstrUserVariable what,
196 if (!TRACE_is_enabled()) return;
198 /* if platform is not traced, we can't deal user variables */
199 if (!TRACE_needs_platform()) return;
202 snprintf(valuestr, 100, "%g", value);
205 case INSTR_US_DECLARE:
206 instr_new_user_variable_type (father_type, variable, color);
210 container_t container = PJ_container_get(resource);
211 type_t type = PJ_type_get (variable, container->type);
212 new_pajeSetVariable(time, container, type, value);
217 container_t container = PJ_container_get(resource);
218 type_t type = PJ_type_get (variable, container->type);
219 new_pajeAddVariable(time, container, type, value);
224 container_t container = PJ_container_get(resource);
225 type_t type = PJ_type_get (variable, container->type);
226 new_pajeSubVariable(time, container, type, value);
230 //TODO: launch exception
235 static void instr_user_srcdst_variable(double time,
238 const char *variable,
239 const char *father_type,
241 InstrUserVariable what)
243 xbt_dynar_t route=NULL;
244 network_element_t src_elm = xbt_lib_get_or_null(host_lib,src,ROUTING_HOST_LEVEL);
245 if(!src_elm) src_elm = xbt_lib_get_or_null(as_router_lib,src,ROUTING_ASR_LEVEL);
246 if(!src_elm) xbt_die("Element '%s' not found!",src);
248 network_element_t dst_elm = xbt_lib_get_or_null(host_lib,dst,ROUTING_HOST_LEVEL);
249 if(!dst_elm) dst_elm = xbt_lib_get_or_null(as_router_lib,dst,ROUTING_ASR_LEVEL);
250 if(!dst_elm) xbt_die("Element '%s' not found!",dst);
252 routing_get_route_and_latency (src_elm, dst_elm, &route,NULL);
255 xbt_dynar_foreach (route, i, link) {
256 char *link_name = ((link_CM02_t)link)->lmm_resource.generic_resource.name;
257 instr_user_variable (time, link_name, variable, father_type, value, what, NULL);
261 /** \ingroup TRACE_API
262 * \brief Creates a file with the topology of the platform file used for the simulator.
264 * The graph topology will have the following properties: all hosts, links and routers
265 * of the platform file are mapped to graph nodes; routes are mapped to edges.
266 * The platform's AS are not represented in the output.
268 * \param filename The name of the file that will hold the graph.
270 * \return 1 of successful, 0 otherwise.
272 int TRACE_platform_graph_export_graphviz (const char *filename)
274 /* returns 1 if successful, 0 otherwise */
275 if (!TRACE_is_enabled()) return 0;
276 xbt_graph_t g = instr_routing_platform_graph();
277 if (g == NULL) return 0;
278 instr_routing_platform_graph_export_graphviz (g, filename);
279 xbt_graph_free_graph (g, xbt_free, xbt_free, NULL);
284 * Derived functions that use instr_user_variable and TRACE_user_srcdst_variable.
285 * They were previously defined as pre-processors directives, but were transformed
286 * into functions so the user can track them using gdb.
289 /* for host variables */
290 /** \ingroup TRACE_user_variables
291 * \brief Declare a new user variable associated to hosts.
293 * Declare a user variable that will be associated to hosts.
294 * A user host variable can be used to trace user variables
295 * such as the number of tasks in a server, the number of
296 * clients in an application (for hosts), and so on. The color
297 * associated to this new variable will be random.
299 * \param variable The name of the new variable to be declared.
301 * \see TRACE_host_variable_declare_with_color
303 void TRACE_host_variable_declare (const char *variable)
305 instr_user_variable(0, NULL, variable, "HOST", 0, INSTR_US_DECLARE, NULL);
308 /** \ingroup TRACE_user_variables
309 * \brief Declare a new user variable associated to hosts with a color.
311 * Same as #TRACE_host_variable_declare, but associated a color
312 * to the newly created user host variable. The color needs to be
313 * a string with three numbers separated by spaces in the range [0,1].
314 * A light-gray color can be specified using "0.7 0.7 0.7" as color.
316 * \param variable The name of the new variable to be declared.
317 * \param color The color for the new variable.
320 void TRACE_host_variable_declare_with_color (const char *variable, const char *color)
322 instr_user_variable(0, NULL, variable, "HOST", 0, INSTR_US_DECLARE, color);
325 /** \ingroup TRACE_user_variables
326 * \brief Set the value of a variable of a host.
328 * \param host The name of the host to be considered.
329 * \param variable The name of the variable to be considered.
330 * \param value The new value of the variable.
332 * \see TRACE_host_variable_declare, TRACE_host_variable_add, TRACE_host_variable_sub
334 void TRACE_host_variable_set (const char *host, const char *variable, double value)
336 TRACE_host_variable_set_with_time (MSG_get_clock(), host, variable, value);
339 /** \ingroup TRACE_user_variables
340 * \brief Add a value to a variable of a host.
342 * \param host The name of the host to be considered.
343 * \param variable The name of the variable to be considered.
344 * \param value The value to be added to the variable.
346 * \see TRACE_host_variable_declare, TRACE_host_variable_set, TRACE_host_variable_sub
348 void TRACE_host_variable_add (const char *host, const char *variable, double value)
350 TRACE_host_variable_add_with_time (MSG_get_clock(), host, variable, value);
353 /** \ingroup TRACE_user_variables
354 * \brief Subtract a value from a variable of a host.
356 * \param host The name of the host to be considered.
357 * \param variable The name of the variable to be considered.
358 * \param value The value to be subtracted from the variable.
360 * \see TRACE_host_variable_declare, TRACE_host_variable_set, TRACE_host_variable_add
362 void TRACE_host_variable_sub (const char *host, const char *variable, double value)
364 TRACE_host_variable_sub_with_time (MSG_get_clock(), host, variable, value);
367 /** \ingroup TRACE_user_variables
368 * \brief Set the value of a variable of a host at a given timestamp.
370 * Same as #TRACE_host_variable_set, but let user specify
371 * the time used to trace it. Users can specify a time that
372 * is not the simulated clock time as defined by the core
373 * simulator. This allows a fine-grain control of time
374 * definition, but should be used with caution since the trace
375 * can be inconsistent if resource utilization traces are also traced.
377 * \param time The timestamp to be used to tag this change of value.
378 * \param host The name of the host to be considered.
379 * \param variable The name of the variable to be considered.
380 * \param value The new value of the variable.
382 * \see TRACE_host_variable_declare, TRACE_host_variable_add_with_time, TRACE_host_variable_sub_with_time
384 void TRACE_host_variable_set_with_time (double time, const char *host, const char *variable, double value)
386 instr_user_variable(time, host, variable, "HOST", value, INSTR_US_SET, NULL);
389 /** \ingroup TRACE_user_variables
390 * \brief Add a value to a variable of a host at a given timestamp.
392 * Same as #TRACE_host_variable_add, but let user specify
393 * the time used to trace it. Users can specify a time that
394 * is not the simulated clock time as defined by the core
395 * simulator. This allows a fine-grain control of time
396 * definition, but should be used with caution since the trace
397 * can be inconsistent if resource utilization traces are also traced.
399 * \param time The timestamp to be used to tag this change of value.
400 * \param host The name of the host to be considered.
401 * \param variable The name of the variable to be considered.
402 * \param value The value to be added to the variable.
404 * \see TRACE_host_variable_declare, TRACE_host_variable_set_with_time, TRACE_host_variable_sub_with_time
406 void TRACE_host_variable_add_with_time (double time, const char *host, const char *variable, double value)
408 instr_user_variable(time, host, variable, "HOST", value, INSTR_US_ADD, NULL);
411 /** \ingroup TRACE_user_variables
412 * \brief Subtract a value from a variable of a host at a given timestamp.
414 * Same as #TRACE_host_variable_sub, but let user specify
415 * the time used to trace it. Users can specify a time that
416 * is not the simulated clock time as defined by the core
417 * simulator. This allows a fine-grain control of time
418 * definition, but should be used with caution since the trace
419 * can be inconsistent if resource utilization traces are also traced.
421 * \param time The timestamp to be used to tag this change of value.
422 * \param host The name of the host to be considered.
423 * \param variable The name of the variable to be considered.
424 * \param value The value to be subtracted from the variable.
426 * \see TRACE_host_variable_declare, TRACE_host_variable_set_with_time, TRACE_host_variable_add_with_time
428 void TRACE_host_variable_sub_with_time (double time, const char *host, const char *variable, double value)
430 instr_user_variable(time, host, variable, "HOST", value, INSTR_US_SUB, NULL);
433 /* for link variables */
434 /** \ingroup TRACE_user_variables
435 * \brief Declare a new user variable associated to links.
437 * Declare a user variable that will be associated to links.
438 * A user link variable can be used, for example, to trace
439 * user variables such as the number of messages being
440 * transferred through network links. The color
441 * associated to this new variable will be random.
443 * \param variable The name of the new variable to be declared.
445 * \see TRACE_link_variable_declare_with_color
447 void TRACE_link_variable_declare (const char *variable)
449 instr_user_variable (0, NULL, variable, "LINK", 0, INSTR_US_DECLARE, NULL);
452 /** \ingroup TRACE_user_variables
453 * \brief Declare a new user variable associated to links with a color.
455 * Same as #TRACE_link_variable_declare, but associated a color
456 * to the newly created user link variable. The color needs to be
457 * a string with three numbers separated by spaces in the range [0,1].
458 * A light-gray color can be specified using "0.7 0.7 0.7" as color.
460 * \param variable The name of the new variable to be declared.
461 * \param color The color for the new variable.
464 void TRACE_link_variable_declare_with_color (const char *variable, const char *color)
466 instr_user_variable (0, NULL, variable, "LINK", 0, INSTR_US_DECLARE, color);
469 /** \ingroup TRACE_user_variables
470 * \brief Set the value of a variable of a link.
472 * \param link The name of the link to be considered.
473 * \param variable The name of the variable to be considered.
474 * \param value The new value of the variable.
476 * \see TRACE_link_variable_declare, TRACE_link_variable_add, TRACE_link_variable_sub
478 void TRACE_link_variable_set (const char *link, const char *variable, double value)
480 TRACE_link_variable_set_with_time (MSG_get_clock(), link, variable, value);
483 /** \ingroup TRACE_user_variables
484 * \brief Add a value to a variable of a link.
486 * \param link The name of the link to be considered.
487 * \param variable The name of the variable to be considered.
488 * \param value The value to be added to the variable.
490 * \see TRACE_link_variable_declare, TRACE_link_variable_set, TRACE_link_variable_sub
492 void TRACE_link_variable_add (const char *link, const char *variable, double value)
494 TRACE_link_variable_add_with_time (MSG_get_clock(), link, variable, value);
497 /** \ingroup TRACE_user_variables
498 * \brief Subtract a value from a variable of a link.
500 * \param link The name of the link to be considered.
501 * \param variable The name of the variable to be considered.
502 * \param value The value to be subtracted from the variable.
504 * \see TRACE_link_variable_declare, TRACE_link_variable_set, TRACE_link_variable_add
506 void TRACE_link_variable_sub (const char *link, const char *variable, double value)
508 TRACE_link_variable_sub_with_time (MSG_get_clock(), link, variable, value);
511 /** \ingroup TRACE_user_variables
512 * \brief Set the value of a variable of a link at a given timestamp.
514 * Same as #TRACE_link_variable_set, but let user specify
515 * the time used to trace it. Users can specify a time that
516 * is not the simulated clock time as defined by the core
517 * simulator. This allows a fine-grain control of time
518 * definition, but should be used with caution since the trace
519 * can be inconsistent if resource utilization traces are also traced.
521 * \param time The timestamp to be used to tag this change of value.
522 * \param link The name of the link to be considered.
523 * \param variable The name of the variable to be considered.
524 * \param value The new value of the variable.
526 * \see TRACE_link_variable_declare, TRACE_link_variable_add_with_time, TRACE_link_variable_sub_with_time
528 void TRACE_link_variable_set_with_time (double time, const char *link, const char *variable, double value)
530 instr_user_variable (time, link, variable, "LINK", value, INSTR_US_SET, NULL);
533 /** \ingroup TRACE_user_variables
534 * \brief Add a value to a variable of a link at a given timestamp.
536 * Same as #TRACE_link_variable_add, but let user specify
537 * the time used to trace it. Users can specify a time that
538 * is not the simulated clock time as defined by the core
539 * simulator. This allows a fine-grain control of time
540 * definition, but should be used with caution since the trace
541 * can be inconsistent if resource utilization traces are also traced.
543 * \param time The timestamp to be used to tag this change of value.
544 * \param link The name of the link to be considered.
545 * \param variable The name of the variable to be considered.
546 * \param value The value to be added to the variable.
548 * \see TRACE_link_variable_declare, TRACE_link_variable_set_with_time, TRACE_link_variable_sub_with_time
550 void TRACE_link_variable_add_with_time (double time, const char *link, const char *variable, double value)
552 instr_user_variable (time, link, variable, "LINK", value, INSTR_US_ADD, NULL);
555 /** \ingroup TRACE_user_variables
556 * \brief Subtract a value from a variable of a link at a given timestamp.
558 * Same as #TRACE_link_variable_sub, but let user specify
559 * the time used to trace it. Users can specify a time that
560 * is not the simulated clock time as defined by the core
561 * simulator. This allows a fine-grain control of time
562 * definition, but should be used with caution since the trace
563 * can be inconsistent if resource utilization traces are also traced.
565 * \param time The timestamp to be used to tag this change of value.
566 * \param link The name of the link to be considered.
567 * \param variable The name of the variable to be considered.
568 * \param value The value to be subtracted from the variable.
570 * \see TRACE_link_variable_declare, TRACE_link_variable_set_with_time, TRACE_link_variable_add_with_time
572 void TRACE_link_variable_sub_with_time (double time, const char *link, const char *variable, double value)
574 instr_user_variable (time, link, variable, "LINK", value, INSTR_US_SUB, NULL);
577 /* for link variables, but with src and dst used for get_route */
578 /** \ingroup TRACE_user_variables
579 * \brief Set the value of the variable present in the links connecting source and destination.
581 * Same as #TRACE_link_variable_set, but instead of providing the
582 * name of link to be considered, provide the source and destination
583 * hosts. All links that are part of the route between source and
584 * destination will have the variable set to the provided value.
586 * \param src The name of the source host for get route.
587 * \param dst The name of the destination host for get route.
588 * \param variable The name of the variable to be considered.
589 * \param value The new value of the variable.
591 * \see TRACE_link_variable_declare, TRACE_link_srcdst_variable_add, TRACE_link_srcdst_variable_sub
593 void TRACE_link_srcdst_variable_set (const char *src, const char *dst, const char *variable, double value)
595 TRACE_link_srcdst_variable_set_with_time (MSG_get_clock(), src, dst, variable, value);
598 /** \ingroup TRACE_user_variables
599 * \brief Add a value to the variable present in the links connecting source and destination.
601 * Same as #TRACE_link_variable_add, but instead of providing the
602 * name of link to be considered, provide the source and destination
603 * hosts. All links that are part of the route between source and
604 * destination will have the value passed as parameter added to
605 * the current value of the variable name to be considered.
607 * \param src The name of the source host for get route.
608 * \param dst The name of the destination host for get route.
609 * \param variable The name of the variable to be considered.
610 * \param value The value to be added to the variable.
612 * \see TRACE_link_variable_declare, TRACE_link_srcdst_variable_set, TRACE_link_srcdst_variable_sub
614 void TRACE_link_srcdst_variable_add (const char *src, const char *dst, const char *variable, double value)
616 TRACE_link_srcdst_variable_add_with_time (MSG_get_clock(), src, dst, variable, value);
619 /** \ingroup TRACE_user_variables
620 * \brief Subtract a value from the variable present in the links connecting source and destination.
622 * Same as #TRACE_link_variable_sub, but instead of providing the
623 * name of link to be considered, provide the source and destination
624 * hosts. All links that are part of the route between source and
625 * destination will have the value passed as parameter subtracted from
626 * the current value of the variable name to be considered.
628 * \param src The name of the source host for get route.
629 * \param dst The name of the destination host for get route.
630 * \param variable The name of the variable to be considered.
631 * \param value The value to be subtracted from the variable.
633 * \see TRACE_link_variable_declare, TRACE_link_srcdst_variable_set, TRACE_link_srcdst_variable_add
635 void TRACE_link_srcdst_variable_sub (const char *src, const char *dst, const char *variable, double value)
637 TRACE_link_srcdst_variable_sub_with_time (MSG_get_clock(), src, dst, variable, value);
640 /** \ingroup TRACE_user_variables
641 * \brief Set the value of the variable present in the links connecting source and destination at a given timestamp.
643 * Same as #TRACE_link_srcdst_variable_set, but let user specify
644 * the time used to trace it. Users can specify a time that
645 * is not the simulated clock time as defined by the core
646 * simulator. This allows a fine-grain control of time
647 * definition, but should be used with caution since the trace
648 * can be inconsistent if resource utilization traces are also traced.
650 * \param time The timestamp to be used to tag this change of value.
651 * \param src The name of the source host for get route.
652 * \param dst The name of the destination host for get route.
653 * \param variable The name of the variable to be considered.
654 * \param value The new value of the variable.
656 * \see TRACE_link_variable_declare, TRACE_link_srcdst_variable_add_with_time, TRACE_link_srcdst_variable_sub_with_time
658 void TRACE_link_srcdst_variable_set_with_time (double time, const char *src, const char *dst, const char *variable, double value)
660 instr_user_srcdst_variable (time, src, dst, variable, "LINK", value, INSTR_US_SET);
663 /** \ingroup TRACE_user_variables
664 * \brief Add a value to the variable present in the links connecting source and destination at a given timestamp.
666 * Same as #TRACE_link_srcdst_variable_add, but let user specify
667 * the time used to trace it. Users can specify a time that
668 * is not the simulated clock time as defined by the core
669 * simulator. This allows a fine-grain control of time
670 * definition, but should be used with caution since the trace
671 * can be inconsistent if resource utilization traces are also traced.
673 * \param time The timestamp to be used to tag this change of value.
674 * \param src The name of the source host for get route.
675 * \param dst The name of the destination host for get route.
676 * \param variable The name of the variable to be considered.
677 * \param value The value to be added to the variable.
679 * \see TRACE_link_variable_declare, TRACE_link_srcdst_variable_set_with_time, TRACE_link_srcdst_variable_sub_with_time
681 void TRACE_link_srcdst_variable_add_with_time (double time, const char *src, const char *dst, const char *variable, double value)
683 instr_user_srcdst_variable (time, src, dst, variable, "LINK", value, INSTR_US_ADD);
686 /** \ingroup TRACE_user_variables
687 * \brief Subtract a value from the variable present in the links connecting source and destination at a given timestamp.
689 * Same as #TRACE_link_srcdst_variable_sub, but let user specify
690 * the time used to trace it. Users can specify a time that
691 * is not the simulated clock time as defined by the core
692 * simulator. This allows a fine-grain control of time
693 * definition, but should be used with caution since the trace
694 * can be inconsistent if resource utilization traces are also traced.
696 * \param time The timestamp to be used to tag this change of value.
697 * \param src The name of the source host for get route.
698 * \param dst The name of the destination host for get route.
699 * \param variable The name of the variable to be considered.
700 * \param value The value to be subtracted from the variable.
702 * \see TRACE_link_variable_declare, TRACE_link_srcdst_variable_set_with_time, TRACE_link_srcdst_variable_add_with_time
704 void TRACE_link_srcdst_variable_sub_with_time (double time, const char *src, const char *dst, const char *variable, double value)
706 instr_user_srcdst_variable (time, src, dst, variable, "LINK", value, INSTR_US_SUB);
709 #endif /* HAVE_TRACING */