IF(HAVE_TRACING)
ADD_TEST(tracing-ms ${CMAKE_BINARY_DIR}/bin/tesh --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/ms.tesh)
ADD_TEST(tracing-categories ${CMAKE_BINARY_DIR}/bin/tesh --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/categories.tesh)
- ADD_TEST(tracing-volume ${CMAKE_BINARY_DIR}/bin/tesh --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/volume.tesh)
ADD_TEST(tracing-tasks ${CMAKE_BINARY_DIR}/bin/tesh --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/tasks.tesh)
ADD_TEST(tracing-process-migration ${CMAKE_BINARY_DIR}/bin/tesh --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/procmig.tesh)
ADD_TEST(graphicator ${CMAKE_BINARY_DIR}/bin/tesh --setenv srcdir=${CMAKE_HOME_DIRECTORY} --setenv bindir=${CMAKE_BINARY_DIR}/bin --cd ${CMAKE_HOME_DIRECTORY}/tools/graphicator graphicator.tesh)
IF(HAVE_TRACING)\r
ADD_TEST(tracing-ms perl ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/tesh.pl ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/ms.tesh)\r
ADD_TEST(tracing-categories perl ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/tesh.pl ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/categories.tesh)\r
- ADD_TEST(tracing-volume perl ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/tesh.pl ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/volume.tesh)\r
ADD_TEST(tracing-tasks perl ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/tesh.pl ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/tasks.tesh)\r
ADD_TEST(tracing-process-migration perl ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/tesh.pl ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/procmig.tesh)\r
ENDIF(HAVE_TRACING)\r
src/instr/instr_paje_trace.c
src/instr/instr_msg_task.c
src/instr/instr_msg_process.c
- src/instr/instr_msg_volume.c
src/instr/instr_smx.c
src/instr/instr_surf.c
src/instr/instr_smpi.c
ADD_TEST(memcheck-tracing-categories-0 ${CMAKE_BINARY_DIR}/examples/msg/tracing/categories --cfg=tracing:1 --cfg=tracing/filename:tracing/categories.trace --cfg=tracing/categorized:1 --cfg=tracing/uncategorized:1 --cfg=triva/categorized:tracing/categories.cat.plist --cfg=triva/uncategorized:tracing/categories.uncat.plist /tracing/platform.xml /tracing/deployment.xml --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
ADD_TEST(memcheck-tracing-categories-1 cat tracing/categories.trace --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
ADD_TEST(memcheck-tracing-categories-2 rm -rf tracing/categories.trace tracing/categories.cat.plist tracing/categories.uncat.plist --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-tracing-volume-0 ${CMAKE_BINARY_DIR}/examples/msg/tracing/volume --cfg=tracing:1 --cfg=tracing/filename:tracing/volume.trace --cfg=tracing/msg/volume:1 /tracing/platform.xml /tracing/deployment.xml --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-tracing-volume-1 cat tracing/volume.trace --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-tracing-volume-2 rm -rf tracing/volume.trace --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
ADD_TEST(memcheck-tracing-tasks-0 ${CMAKE_BINARY_DIR}/examples/msg/tracing/tasks --cfg=tracing:1 --cfg=tracing/msg/task:1 --cfg=tracing/filename:tracing/tasks.trace /tracing/platform.xml /tracing/deployment.xml --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
ADD_TEST(memcheck-tracing-tasks-1 cat tracing/tasks.trace --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
ADD_TEST(memcheck-tracing-tasks-2 rm -rf tracing/tasks.trace --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
add_executable(ms ${CMAKE_CURRENT_SOURCE_DIR}/ms.c)
add_executable(categories ${CMAKE_CURRENT_SOURCE_DIR}/categories.c)
-add_executable(volume ${CMAKE_CURRENT_SOURCE_DIR}/volume.c)
add_executable(tasks ${CMAKE_CURRENT_SOURCE_DIR}/tasks.c)
add_executable(procmig ${CMAKE_CURRENT_SOURCE_DIR}/procmig.c)
### Add definitions for compile
target_link_libraries(ms simgrid m )
target_link_libraries(categories simgrid m )
-target_link_libraries(volume simgrid m )
target_link_libraries(tasks simgrid m )
target_link_libraries(procmig simgrid m )
+++ /dev/null
-/* $Id$ */
-
-/* Copyright (c) 2002,2003,2004 Arnaud Legrand. All rights reserved. */
-
-/* This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. */
-
-#include <stdio.h>
-#include "msg/msg.h"
-#include "xbt/sysdep.h" /* calloc, printf */
-
-/* Create a log channel to have nice outputs. */
-#include "xbt/log.h"
-#include "xbt/asserts.h"
-XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test,
- "Messages specific for this msg example");
-
-int master(int argc, char *argv[]);
-int slave(int argc, char *argv[]);
-MSG_error_t test_all(const char *platform_file,
- const char *application_file);
-
-/** Emitter function */
-int master(int argc, char *argv[])
-{
- long number_of_tasks = atol(argv[1]);
- long slaves_count = atol(argv[4]);
- int p = 1000000000;
- int c = 10000000;
-
- int i;
- for (i = 0; i < number_of_tasks; i++) {
- m_task_t task = NULL;
- task = MSG_task_create("task_compute", p, c, NULL);
- TRACE_msg_set_task_category(task, "compute");
- MSG_task_send(task, "master_mailbox");
- task = NULL;
- task = MSG_task_create("task_request", p, c, NULL);
- TRACE_msg_set_task_category(task, "request");
- MSG_task_send(task, "master_mailbox");
- task = NULL;
- task = MSG_task_create("task_data", p, c, NULL);
- TRACE_msg_set_task_category(task, "data");
- MSG_task_send(task, "master_mailbox");
- }
-
- for (i = 0; i < slaves_count; i++) {
- m_task_t finalize = MSG_task_create("finalize", 0, 1000, 0);
- TRACE_msg_set_task_category(finalize, "finalize");
- MSG_task_send(finalize, "master_mailbox");
- }
-
- return 0;
-}
-
-/** Receiver function */
-int slave(int argc, char *argv[])
-{
- m_task_t task = NULL;
- int res;
-
- while (1) {
- res = MSG_task_receive(&(task), "master_mailbox");
-
- if (!strcmp(MSG_task_get_name(task), "finalize")) {
- MSG_task_destroy(task);
- break;
- }
-
- MSG_task_execute(task);
- MSG_task_destroy(task);
- task = NULL;
- }
- return 0;
-}
-
-/** Test function */
-MSG_error_t test_all(const char *platform_file,
- const char *application_file)
-{
- MSG_error_t res = MSG_OK;
-
- { /* Simulation setting */
- MSG_set_channel_number(0);
- MSG_create_environment(platform_file);
- }
- {
- //--cfg=tracing/msg/volume
- // - the communication volume among processes expects that:
- // - the processes involved have a category
- // - the sent tasks have a category
-
- //declaring user categories (for tasks)
- TRACE_category_with_color ("compute", "1 0 0"); //red
- TRACE_category_with_color ("request", "0 1 0"); //green
- TRACE_category_with_color ("data", "0 0 1"); //blue
- TRACE_category_with_color ("finalize", "0 0 0");//black
- }
- { /* Application deployment */
- MSG_function_register("master", master);
- MSG_function_register("slave", slave);
- MSG_launch_application(application_file);
- }
- res = MSG_main();
-
- XBT_INFO("Simulation time %g", MSG_get_clock());
- return res;
-}
-
-
-/** Main function */
-int main(int argc, char *argv[])
-{
- MSG_error_t res = MSG_OK;
-
- MSG_global_init(&argc, argv);
- if (argc < 3) {
- printf("Usage: %s platform_file deployment_file\n", argv[0]);
- printf("example: %s msg_platform.xml msg_deployment.xml\n", argv[0]);
- exit(1);
- }
-
- res = test_all(argv[1], argv[2]);
- MSG_clean();
-
- if (res == MSG_OK)
- return 0;
- else
- return 1;
-} /* end_of_main */
+++ /dev/null
-#! ./tesh
-
-p Tracing communications among processes of a master/slave application
-
-$ $SG_TEST_EXENV ${bindir:=.}/tracing/volume$EXEEXT --cfg=tracing:1 --cfg=tracing/buffer:1 --cfg=tracing/filename:tracing/volume.trace --cfg=tracing/msg/volume:1 ${srcdir:=.}/tracing/platform.xml ${srcdir:=.}/tracing/deployment.xml
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing' to '1'
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/buffer' to '1'
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/filename' to 'tracing/volume.trace'
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/msg/volume' to '1'
-> [206.701532] [msg_test/INFO] Simulation time 206.702
-
-$ cat tracing/volume.trace
-> %EventDef PajeDefineContainerType 0
-> % Alias string
-> % ContainerType string
-> % Name string
-> %EndEventDef
-> %EventDef PajeDefineVariableType 1
-> % Alias string
-> % ContainerType string
-> % Name string
-> % Color color
-> %EndEventDef
-> %EventDef PajeDefineStateType 2
-> % Alias string
-> % ContainerType string
-> % Name string
-> %EndEventDef
-> %EventDef PajeDefineEventType 3
-> % Alias string
-> % EntityType string
-> % Name string
-> % Color color
-> %EndEventDef
-> %EventDef PajeDefineLinkType 4
-> % Alias string
-> % ContainerType string
-> % SourceContainerType string
-> % DestContainerType string
-> % Name string
-> %EndEventDef
-> %EventDef PajeDefineEntityValue 5
-> % Alias string
-> % EntityType string
-> % Name string
-> % Color color
-> %EndEventDef
-> %EventDef PajeCreateContainer 6
-> % Time date
-> % Alias string
-> % Type string
-> % Container string
-> % Name string
-> %EndEventDef
-> %EventDef PajeDestroyContainer 7
-> % Time date
-> % Type string
-> % Container string
-> %EndEventDef
-> %EventDef PajeSetVariable 8
-> % Time date
-> % EntityType string
-> % Container string
-> % Value string
-> %EndEventDef
-> %EventDef PajeAddVariable 9
-> % Time date
-> % EntityType string
-> % Container string
-> % Value string
-> %EndEventDef
-> %EventDef PajeSubVariable 10
-> % Time date
-> % EntityType string
-> % Container string
-> % Value string
-> %EndEventDef
-> %EventDef PajeSetState 11
-> % Time date
-> % EntityType string
-> % Container string
-> % Value string
-> %EndEventDef
-> %EventDef PajePushState 12
-> % Time date
-> % EntityType string
-> % Container string
-> % Value string
-> %EndEventDef
-> %EventDef PajePopState 13
-> % Time date
-> % EntityType string
-> % Container string
-> %EndEventDef
-> %EventDef PajeStartLink 14
-> % Time date
-> % EntityType string
-> % Container string
-> % Value string
-> % SourceContainer string
-> % Key string
-> %EndEventDef
-> %EventDef PajeEndLink 15
-> % Time date
-> % EntityType string
-> % Container string
-> % Value string
-> % DestContainer string
-> % Key string
-> %EndEventDef
-> %EventDef PajeNewEvent 16
-> % Time date
-> % EntityType string
-> % Container string
-> % Value string
-> %EndEventDef
-> 0 1 0 HOST
-> 6 0 1 1 0 Tremblay
-> 1 2 1 power "1 1 1"
-> 6 0 2 1 0 Jupiter
-> 6 0 3 1 0 Fafard
-> 6 0 4 1 0 Ginette
-> 6 0 5 1 0 Bourassa
-> 0 3 0 LINK
-> 6 0 6 3 0 6
-> 1 4 3 bandwidth "1 1 1"
-> 1 5 3 latency "1 1 1"
-> 6 0 7 3 0 3
-> 6 0 8 3 0 7
-> 6 0 9 3 0 9
-> 6 0 10 3 0 2
-> 6 0 11 3 0 8
-> 6 0 12 3 0 1
-> 6 0 13 3 0 4
-> 6 0 14 3 0 0
-> 6 0 15 3 0 5
-> 4 6 0 1 3 HOST-LINK
-> 4 7 0 3 3 LINK-LINK
-> 4 8 0 3 1 LINK-HOST
-> 8 0 2 1 98095000.000000
-> 8 0 2 2 76296000.000000
-> 8 0 2 3 76296000.000000
-> 8 0 2 4 48492000.000000
-> 8 0 2 5 48492000.000000
-> 8 0 4 6 41279125.000000
-> 8 0 5 6 0.000060
-> 8 0 4 7 34285625.000000
-> 8 0 5 7 0.000514
-> 8 0 4 8 11618875.000000
-> 8 0 5 8 0.000190
-> 8 0 4 9 7209750.000000
-> 8 0 5 9 0.001462
-> 8 0 4 10 118682500.000000
-> 8 0 5 10 0.000137
-> 8 0 4 11 8158000.000000
-> 8 0 5 11 0.000271
-> 8 0 4 12 34285625.000000
-> 8 0 5 12 0.000514
-> 8 0 4 13 10099625.000000
-> 8 0 5 13 0.000480
-> 8 0 4 14 41279125.000000
-> 8 0 5 14 0.000060
-> 8 0 4 15 27946250.000000
-> 8 0 5 15 0.000278
-> 14 0 6 0 G 3 0
-> 15 0 6 0 G 11 0
-> 14 0 7 0 G 11 1
-> 15 0 7 0 G 12 1
-> 14 0 7 0 G 12 2
-> 15 0 7 0 G 14 2
-> 14 0 7 0 G 14 3
-> 15 0 7 0 G 10 3
-> 14 0 7 0 G 10 4
-> 15 0 7 0 G 7 4
-> 14 0 7 0 G 7 5
-> 15 0 7 0 G 13 5
-> 14 0 8 0 G 13 6
-> 15 0 8 0 G 1 6
-> 14 0 7 0 G 11 7
-> 15 0 7 0 G 6 7
-> 14 0 7 0 G 6 8
-> 15 0 7 0 G 8 8
-> 14 0 8 0 G 8 9
-> 15 0 8 0 G 5 9
-> 14 0 7 0 G 13 10
-> 15 0 7 0 G 9 10
-> 14 0 8 0 G 9 11
-> 15 0 8 0 G 2 11
-> 14 0 7 0 G 10 12
-> 15 0 7 0 G 15 12
-> 14 0 8 0 G 15 13
-> 15 0 8 0 G 4 13
-> 14 0 7 0 G 12 14
-> 15 0 7 0 G 6 14
-> 14 0 6 0 G 1 15
-> 15 0 6 0 G 9 15
-> 14 0 7 0 G 7 16
-> 15 0 7 0 G 15 16
-> 7 206.701532 1 3
-> 7 206.701532 1 1
-> 7 206.701532 3 14
-> 7 206.701532 3 12
-> 7 206.701532 3 10
-> 7 206.701532 3 7
-> 7 206.701532 3 13
-> 7 206.701532 3 15
-> 7 206.701532 3 6
-> 7 206.701532 3 8
-> 7 206.701532 3 11
-> 7 206.701532 3 9
-> 7 206.701532 1 5
-> 7 206.701532 1 2
-> 7 206.701532 1 4
-> 7 206.701532 0 0
-
-$ rm -rf tracing/volume.trace
#define OPT_TRACING_UNCATEGORIZED "tracing/uncategorized"
#define OPT_TRACING_MSG_TASK "tracing/msg/task"
#define OPT_TRACING_MSG_PROCESS "tracing/msg/process"
-#define OPT_TRACING_MSG_VOLUME "tracing/msg/volume"
#define OPT_TRACING_FILENAME "tracing/filename"
#define OPT_TRACING_BUFFER "tracing/buffer"
#define OPT_TRACING_ONELINK_ONLY "tracing/onelink_only"
static int trace_uncategorized;
static int trace_msg_task_enabled;
static int trace_msg_process_enabled;
-static int trace_msg_volume_enabled;
static int trace_buffer;
static int trace_onelink_only;
trace_uncategorized = xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_UNCATEGORIZED);
trace_msg_task_enabled = xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_MSG_TASK);
trace_msg_process_enabled = xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_MSG_PROCESS);
- trace_msg_volume_enabled = xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_MSG_VOLUME);
trace_buffer = xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_BUFFER);
trace_onelink_only = xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_ONELINK_ONLY);
}
return trace_msg_process_enabled && TRACE_is_enabled();
}
-int TRACE_msg_volume_is_enabled(void)
-{
- return trace_msg_volume_enabled && TRACE_is_enabled();
-}
-
int TRACE_buffer (void)
{
return trace_buffer && TRACE_is_enabled();
xbt_cfgelm_int, &default_tracing_msg_process, 0, 1,
NULL, NULL);
- /* msg volume (experimental) */
- int default_tracing_msg_volume = 0;
- xbt_cfg_register(&_surf_cfg_set, OPT_TRACING_MSG_VOLUME,
- "Tracing of MSG communication volume (experimental).",
- xbt_cfgelm_int, &default_tracing_msg_volume, 0, 1,
- NULL, NULL);
-
- /* msg volume (experimental) */
+ /* tracing buffer */
int default_buffer = 0;
xbt_cfg_register(&_surf_cfg_set, OPT_TRACING_BUFFER,
"Buffer trace events to put them in temporal order.",
xbt_cfgelm_int, &default_buffer, 0, 1,
NULL, NULL);
- /* msg volume (experimental) */
+ /* tracing one link only */
int default_onelink_only = 0;
xbt_cfg_register(&_surf_cfg_set, OPT_TRACING_ONELINK_ONLY,
"Use only routes with one link to trace platform.",
" behavior of all categorized MSG processes, grouping them by hosts. This option\n"
" can be used to track process location if this simulator has process migration.",
detailed);
- print_line (OPT_TRACING_MSG_VOLUME, "Tracing of communication volume (MSG)",
- " This experimental option only has effect if this simulator is MSG-based.\n"
- " It traces the communication volume of MSG send/receive.",
- detailed);
print_line (OPT_TRACING_BUFFER, "Buffer events to put them in temporal order",
" This option put some events in a time-ordered buffer using the insertion\n"
" sort algorithm. The process of acquiring and releasing locks to access this\n"
if (TRACE_msg_task_is_enabled()){
- //FIXME
- //if (TRACE_msg_volume_is_enabled()){
- // TRACE_msg_volume_end(task);
- //}
-
m_host_t host = MSG_host_self();
container_t host_container = getContainer(host->name);
container_t msg = newContainer(task->name, INSTR_MSG_TASK, host_container);
new_pajeStartLink(MSG_get_clock(), getRootContainer(), type, msg, "SR", key);
destroyContainer (msg);
-
- //FIXME
- //if (TRACE_msg_volume_is_enabled()){
- // TRACE_msg_volume_start(task);
- //}
}
if (TRACE_msg_process_is_enabled()){
+++ /dev/null
-/* Copyright (c) 2010. The SimGrid Team.
- * All rights reserved. */
-
-/* This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. */
-
-#include "instr/instr_private.h"
-
-#ifdef HAVE_TRACING
-
-void TRACE_msg_volume_start(m_task_t task)
-{
- xbt_die ("tracing/msg/volume:1 is deprecated.");
-// m_process_t process = NULL;
-// m_host_t host = NULL;
-// char process_name[200], process_alias[200];
-// char task_name[200];
-// double volume = 0;
-// if (!TRACE_msg_volume_is_enabled())
-// return;
-//
-// /* check if task is traced */
-// if (!task->category)
-// return;
-//
-// /* check if process is traced */
-// process = MSG_process_self();
-// if (!process->category)
-// return;
-//
-// host = MSG_process_get_host(process);
-// TRACE_process_container(process, process_name, 200);
-// TRACE_process_alias_container(process, host, process_alias, 200);
-// TRACE_task_container(task, task_name, 200);
-//
-// volume = MSG_task_get_data_size(task);
-//
-// pajeStartLinkWithVolume(MSG_get_clock(), "volume", "0", task->category,
-// process_alias, task_name, volume);
-}
-
-void TRACE_msg_volume_finish(m_task_t task)
-{
- xbt_die ("tracing/msg/volume:1 is deprecated.");
-// char process_name[200], process_alias[200];
-// char task_name[200];
-// m_process_t process = NULL;
-// m_host_t host = NULL;
-// if (!TRACE_msg_volume_is_enabled())
-// return;
-//
-// /* check if task is traced */
-// if (!task->category)
-// return;
-//
-// /* check if process is traced */
-// process = MSG_process_self();
-// if (!process->category)
-// return;
-//
-// host = MSG_process_get_host(process);
-// TRACE_process_container(process, process_name, 200);
-// TRACE_process_alias_container(process, host, process_alias, 200);
-// TRACE_task_container(task, task_name, 200);
-//
-// pajeEndLink(MSG_get_clock(), "volume", "0", task->category,
-// process_alias, task_name);
-}
-
-#endif /* HAVE_TRACING */
void TRACE_msg_process_sleep_out(m_process_t process);
void TRACE_msg_process_end(m_process_t process);
-/* declaration of instrumentation functions from msg_volume.c */
-void TRACE_msg_volume_start(m_task_t task);
-void TRACE_msg_volume_finish(m_task_t task);
-
/* from smx.c */
void TRACE_smx_host_execute(smx_action_t act);
void TRACE_smx_action_communicate(smx_action_t act, smx_process_t proc);
int TRACE_uncategorized (void);
int TRACE_msg_task_is_enabled(void);
int TRACE_msg_process_is_enabled(void);
-int TRACE_msg_volume_is_enabled(void);
int TRACE_buffer (void);
int TRACE_onelink_only (void);
char *TRACE_get_filename(void);