summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
94e3cab)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@6300
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
- added two regression tests about this in datadesc_usage
* Be more verbose when propagating local exceptions
This helps debugging.
- added two regression tests about this in datadesc_usage
* Be more verbose when propagating local exceptions
This helps debugging.
+ * Display the status of simulated processes when receiving SIGINT in
+ simulation mode
MSG:
* Allow to control the simulation from a trace file.
MSG:
* Allow to control the simulation from a trace file.
static void gras_sigint_handler(int sig) {
static double lastone = 0;
if (lastone == 0 || xbt_os_time() - lastone > 5) {
static void gras_sigint_handler(int sig) {
static double lastone = 0;
if (lastone == 0 || xbt_os_time() - lastone > 5) {
- xbt_backtrace_display_current();
+ if (gras_if_RL())
+ xbt_backtrace_display_current();
+ else
+ SIMIX_display_process_status();
fprintf(stderr,
"\nBacktrace displayed because Ctrl-C was pressed. Press again (within 5 sec) to abort the process.\n");
lastone = xbt_os_time();
fprintf(stderr,
"\nBacktrace displayed because Ctrl-C was pressed. Press again (within 5 sec) to abort the process.\n");
lastone = xbt_os_time();
xbt_getpid = gras_os_getpid;
/* First initialize the XBT */
xbt_init(argc,argv);
xbt_getpid = gras_os_getpid;
/* First initialize the XBT */
xbt_init(argc,argv);
-
- /* module registrations:
- * - declare process specific data we need (without creating them)
+
+ /* module registrations:
+ * - declare process specific data we need (without creating them)
*/
if (gras_running_process == 0) {
/* Connect our log channels: that must be done manually under windows */
*/
if (gras_running_process == 0) {
/* Connect our log channels: that must be done manually under windows */
XBT_LOG_CONNECT(gras_ddt_exchange, gras_ddt);
XBT_LOG_CONNECT(gras_ddt_lexer, gras_ddt_parse);
XBT_LOG_CONNECT(gras_ddt_parse, gras_ddt);
XBT_LOG_CONNECT(gras_ddt_exchange, gras_ddt);
XBT_LOG_CONNECT(gras_ddt_lexer, gras_ddt_parse);
XBT_LOG_CONNECT(gras_ddt_parse, gras_ddt);
XBT_LOG_CONNECT(gras_modules, gras);
XBT_LOG_CONNECT(gras_modules, gras);
XBT_LOG_CONNECT(gras_msg, gras);
XBT_LOG_CONNECT(gras_msg_read, gras_msg);
XBT_LOG_CONNECT(gras_msg_rpc, gras_msg);
XBT_LOG_CONNECT(gras_msg, gras);
XBT_LOG_CONNECT(gras_msg_read, gras_msg);
XBT_LOG_CONNECT(gras_msg_rpc, gras_msg);
XBT_LOG_CONNECT(gras_timer, gras);
XBT_LOG_CONNECT(gras_timer, gras);
XBT_LOG_CONNECT(gras_trp, gras);
XBT_LOG_CONNECT(gras_trp_meas, gras_trp);
XBT_LOG_CONNECT(gras_trp, gras);
XBT_LOG_CONNECT(gras_trp_meas, gras_trp);
XBT_LOG_CONNECT(gras_virtu, gras);
XBT_LOG_CONNECT(gras_virtu_emul, gras_virtu);
XBT_LOG_CONNECT(gras_virtu_process, gras_virtu);
XBT_LOG_CONNECT(gras_virtu, gras);
XBT_LOG_CONNECT(gras_virtu_emul, gras_virtu);
XBT_LOG_CONNECT(gras_virtu_process, gras_virtu);
gras_trp_register();
gras_msg_register();
}
gras_trp_register();
gras_msg_register();
}
/*
* Initialize the process specific stuff
*/
gras_process_init(); /* calls procdata_init, which creates process specific data for each module */
/*
* Initialize the process specific stuff
*/
gras_process_init(); /* calls procdata_init, which creates process specific data for each module */
/*
* Initialize the global stuff if it's not the first process created
*/
/*
* Initialize the global stuff if it's not the first process created
*/
signal(SIGUSR1,gras_sigusr_handler);
# endif
signal(SIGINT,gras_sigint_handler);
signal(SIGUSR1,gras_sigusr_handler);
# endif
signal(SIGINT,gras_sigint_handler);
/* and then init amok */
amok_init();
/* and then init amok */
amok_init();
/* And finally, launch the listener thread */
pd = gras_procdata_get();
msg_pd = gras_libdata_by_name("gras_msg");
/* And finally, launch the listener thread */
pd = gras_procdata_get();
msg_pd = gras_libdata_by_name("gras_msg");
static char*buff=NULL;
static int buffsize=0;
int i,pos=0;
static char*buff=NULL;
static int buffsize=0;
int i,pos=0;
if (buffsize<5*(size+1)) {
if (buff)
free(buff);
buffsize=5*(size+1);
buff=xbt_malloc(buffsize);
}
if (buffsize<5*(size+1)) {
if (buff)
free(buff);
buffsize=5*(size+1);
buff=xbt_malloc(buffsize);
}
if (downside) {
begin=size-1;
if (downside) {
begin=size-1;
for (i=begin; 0<=i && i<size ; i+=increment) {
if (data[i]<32 || data[i]>126)
sprintf(buff+pos,".");
for (i=begin; 0<=i && i<size ; i+=increment) {
if (data[i]<32 || data[i]>126)
sprintf(buff+pos,".");
}
sprintf(buff+pos,")");
while (buff[++pos]);
}
sprintf(buff+pos,")");
while (buff[++pos]);
return buff;
}
void hexa_print(const char*name, unsigned char *data, int size) {
return buff;
}
void hexa_print(const char*name, unsigned char *data, int size) {
#include "xbt_modinter.h"
#include "xbt/sysdep.h"
#include "xbt_modinter.h"
#include "xbt/sysdep.h"
+#include "simix/simix.h"
XBT_LOG_EXTERNAL_CATEGORY(xbt);
XBT_LOG_EXTERNAL_CATEGORY(xbt_sync_rl);
XBT_LOG_EXTERNAL_CATEGORY(xbt);
XBT_LOG_EXTERNAL_CATEGORY(xbt_sync_rl);
void xbt_context_mod_init(void) {
XBT_LOG_CONNECT(xbt_sync_rl, xbt);
XBT_LOG_CONNECT(gras_trp_file, gras_trp);
void xbt_context_mod_init(void) {
XBT_LOG_CONNECT(xbt_sync_rl, xbt);
XBT_LOG_CONNECT(gras_trp_file, gras_trp);
- XBT_LOG_CONNECT(gras_trp_tcp, gras_trp);
+ XBT_LOG_CONNECT(gras_trp_tcp, gras_trp);
void xbt_context_mod_exit(void) {}
void xbt_context_mod_exit(void) {}
+
+void SIMIX_display_process_status(void) {}