From: mquinson Date: Wed, 24 May 2006 12:13:12 +0000 (+0000) Subject: Sanitize the log channels naming scheme in GRAS too X-Git-Tag: v3.3~3066 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/6fb0204d71beff637638ef52978df0e8f58453d7 Sanitize the log channels naming scheme in GRAS too git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2292 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/gras/DataDesc/cbps.c b/src/gras/DataDesc/cbps.c index 952931e007..4f8eef743a 100644 --- a/src/gras/DataDesc/cbps.c +++ b/src/gras/DataDesc/cbps.c @@ -11,7 +11,7 @@ #include "xbt/ex.h" #include "gras/DataDesc/datadesc_private.h" -XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ddt_cbps,datadesc,"callback persistant state"); +XBT_LOG_NEW_DEFAULT_SUBCATEGORY(gras_ddt_cbps,gras_ddt,"callback persistant state"); typedef struct { gras_datadesc_type_t type; diff --git a/src/gras/DataDesc/datadesc.c b/src/gras/DataDesc/datadesc.c index bca8502d82..7be56977d5 100644 --- a/src/gras/DataDesc/datadesc.c +++ b/src/gras/DataDesc/datadesc.c @@ -11,7 +11,7 @@ #include "gras/DataDesc/datadesc_private.h" -XBT_LOG_NEW_DEFAULT_SUBCATEGORY(datadesc,gras,"Data description"); +XBT_LOG_NEW_DEFAULT_SUBCATEGORY(gras_ddt,gras,"Data description"); /* FIXME: make this host-dependent using a trick such as UserData*/ /*@null@*/xbt_set_t gras_datadesc_set_local=NULL; diff --git a/src/gras/DataDesc/ddt_convert.c b/src/gras/DataDesc/ddt_convert.c index 5f1842e69c..404998e7d6 100644 --- a/src/gras/DataDesc/ddt_convert.c +++ b/src/gras/DataDesc/ddt_convert.c @@ -15,7 +15,7 @@ #include "gras/DataDesc/datadesc_private.h" -XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ddt_convert,datadesc, +XBT_LOG_NEW_DEFAULT_SUBCATEGORY(gras_ddt_convert,gras_ddt, "Inter-architecture convertions"); /*** diff --git a/src/gras/DataDesc/ddt_create.c b/src/gras/DataDesc/ddt_create.c index 8cedb2716a..2a5cffa7fa 100644 --- a/src/gras/DataDesc/ddt_create.c +++ b/src/gras/DataDesc/ddt_create.c @@ -13,7 +13,7 @@ #include "xbt/ex.h" #include "gras/DataDesc/datadesc_private.h" -XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ddt_create,datadesc,"Creating new datadescriptions"); +XBT_LOG_NEW_DEFAULT_SUBCATEGORY(gras_ddt_create,gras_ddt,"Creating new datadescriptions"); /*** prototypes ***/ static gras_dd_cat_field_t diff --git a/src/gras/DataDesc/ddt_exchange.c b/src/gras/DataDesc/ddt_exchange.c index 49f0879fae..4f0dcee643 100644 --- a/src/gras/DataDesc/ddt_exchange.c +++ b/src/gras/DataDesc/ddt_exchange.c @@ -13,7 +13,7 @@ #include "gras/DataDesc/datadesc_private.h" #include "gras/Transport/transport_interface.h" /* gras_trp_send/recv */ -XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ddt_exchange,datadesc, +XBT_LOG_NEW_DEFAULT_SUBCATEGORY(gras_ddt_exchange,gras_ddt, "Sending data over the network"); const char *gras_datadesc_cat_names[9] = { "undefined", diff --git a/src/gras/DataDesc/ddt_parse.c b/src/gras/DataDesc/ddt_parse.c index 7cb63fcc66..df88228690 100644 --- a/src/gras/DataDesc/ddt_parse.c +++ b/src/gras/DataDesc/ddt_parse.c @@ -15,7 +15,7 @@ #include "gras/DataDesc/datadesc_private.h" #include "gras/DataDesc/ddt_parse.yy.h" -XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ddt_parse,datadesc, +XBT_LOG_NEW_DEFAULT_SUBCATEGORY(gras_ddt_parse,gras_ddt, "Parsing C data structures to build GRAS data description"); typedef struct s_type_modifier{ @@ -181,7 +181,7 @@ static void parse_statement(char *definition, THROW0(mismatch_error,0,"End of the englobing structure or union"); } - if (XBT_LOG_ISENABLED(ddt_parse,xbt_log_priority_debug)) { + if (XBT_LOG_ISENABLED(gras_ddt_parse,xbt_log_priority_debug)) { int colon_pos; for (colon_pos = gras_ddt_parse_col_pos; definition[colon_pos] != ';'; diff --git a/src/gras/DataDesc/ddt_parse.yy.c b/src/gras/DataDesc/ddt_parse.yy.c index 36a4b8e7d3..6b35f7928b 100644 --- a/src/gras/DataDesc/ddt_parse.yy.c +++ b/src/gras/DataDesc/ddt_parse.yy.c @@ -498,7 +498,7 @@ char *gras_ddt_parse_text; int gras_ddt_parse_char_pos = 0; int gras_ddt_parse_tok_num = 0; const char *definition; - XBT_LOG_NEW_DEFAULT_SUBCATEGORY(lexer,ddt_parse,"The crude internals of the lexer used for type parsing"); + XBT_LOG_NEW_DEFAULT_SUBCATEGORY(gras_ddt_lexer,gras_ddt_parse,"The crude internals of the lexer used for type parsing"); #define SHOW_WHERE DEBUG4("%d:%d (char #%d): seen '%s'", gras_ddt_parse_line_pos,gras_ddt_parse_col_pos,gras_ddt_parse_char_pos,gras_ddt_parse_text) #line 505 "gras/DataDesc/ddt_parse.yy.c" diff --git a/src/gras/DataDesc/ddt_parse.yy.l b/src/gras/DataDesc/ddt_parse.yy.l index 4a633eeea5..f3b62cb252 100644 --- a/src/gras/DataDesc/ddt_parse.yy.l +++ b/src/gras/DataDesc/ddt_parse.yy.l @@ -20,7 +20,7 @@ int gras_ddt_parse_char_pos = 0; int gras_ddt_parse_tok_num = 0; const char *definition; - XBT_LOG_NEW_DEFAULT_SUBCATEGORY(lexer,ddt_parse,"The crude internals of the lexer used for type parsing"); + XBT_LOG_NEW_DEFAULT_SUBCATEGORY(gras_ddt_lexer,gras_ddt_parse,"The crude internals of the lexer used for type parsing"); #define SHOW_WHERE DEBUG4("%d:%d (char #%d): seen '%s'", gras_ddt_parse_line_pos,gras_ddt_parse_col_pos,gras_ddt_parse_char_pos,yytext) %} diff --git a/src/gras/Msg/rpc.c b/src/gras/Msg/rpc.c index 14e774bd55..7156c37282 100644 --- a/src/gras/Msg/rpc.c +++ b/src/gras/Msg/rpc.c @@ -9,11 +9,9 @@ #include "gras/Msg/msg_private.h" -//XBT_LOG_NEW_DEFAULT_SUBCATEGORY(gras_rpc,gras_msg,"RPCing"); - xbt_set_t _gras_rpctype_set = NULL; -XBT_LOG_NEW_DEFAULT_SUBCATEGORY(gras_rpc,gras_msg,"RPC mecanism"); +XBT_LOG_NEW_DEFAULT_SUBCATEGORY(gras_msg_rpc,gras_msg,"RPC mecanism"); /** @brief declare a new versionned RPC type of the given name and payloads diff --git a/src/gras/Transport/rl_transport.c b/src/gras/Transport/rl_transport.c index add3f885cf..0a702e2dcd 100644 --- a/src/gras/Transport/rl_transport.c +++ b/src/gras/Transport/rl_transport.c @@ -10,8 +10,7 @@ #include "xbt/ex.h" #include "portable.h" #include "gras/Transport/transport_private.h" -XBT_LOG_EXTERNAL_CATEGORY(transport); -XBT_LOG_DEFAULT_CATEGORY(transport); +XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(gras_trp); /** * gras_trp_select: diff --git a/src/gras/Transport/sg_transport.c b/src/gras/Transport/sg_transport.c index 1715312fce..3295dd1876 100644 --- a/src/gras/Transport/sg_transport.c +++ b/src/gras/Transport/sg_transport.c @@ -12,8 +12,7 @@ #include "msg/msg.h" #include "gras/Virtu/virtu_sg.h" -XBT_LOG_EXTERNAL_CATEGORY(transport); -XBT_LOG_DEFAULT_CATEGORY(transport); +XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(gras_trp); /** * gras_trp_select: diff --git a/src/gras/Transport/transport.c b/src/gras/Transport/transport.c index 4e763316e5..7dc7785f12 100644 --- a/src/gras/Transport/transport.c +++ b/src/gras/Transport/transport.c @@ -11,8 +11,8 @@ #include "portable.h" #include "gras/Transport/transport_private.h" -XBT_LOG_NEW_DEFAULT_SUBCATEGORY(transport,gras,"Conveying bytes over the network"); -XBT_LOG_NEW_SUBCATEGORY(trp_meas,transport,"Conveying bytes over the network without formating for perf measurements"); +XBT_LOG_NEW_DEFAULT_SUBCATEGORY(gras_trp,gras,"Conveying bytes over the network"); +XBT_LOG_NEW_SUBCATEGORY(gras_trp_meas,gras_trp,"Conveying bytes over the network without formating for perf measurements"); static short int _gras_trp_started = 0; static xbt_dict_t _gras_trp_plugins; /* All registered plugins */ @@ -408,12 +408,12 @@ void gras_socket_meas_send(gras_socket_t peer, xbt_assert0(peer->outgoing,"Socket not suited for data send (was created with gras_socket_server(), not gras_socket_client())"); for (exp_sofar=0; exp_sofar < exp_size; exp_sofar += msg_size) { - CDEBUG5(trp_meas,"Sent %lu of %lu (msg_size=%ld) to %s:%d", + CDEBUG5(gras_trp_meas,"Sent %lu of %lu (msg_size=%ld) to %s:%d", exp_sofar,exp_size,msg_size, gras_socket_peer_name(peer), gras_socket_peer_port(peer)); (*peer->plugin->raw_send)(peer,chunk,msg_size); } - CDEBUG5(trp_meas,"Sent %lu of %lu (msg_size=%ld) to %s:%d", + CDEBUG5(gras_trp_meas,"Sent %lu of %lu (msg_size=%ld) to %s:%d", exp_sofar,exp_size,msg_size, gras_socket_peer_name(peer), gras_socket_peer_port(peer)); @@ -446,12 +446,12 @@ void gras_socket_meas_recv(gras_socket_t peer, xbt_assert0(peer->incoming,"Socket not suited for data receive"); for (exp_sofar=0; exp_sofar < exp_size; exp_sofar += msg_size) { - CDEBUG5(trp_meas,"Recvd %ld of %lu (msg_size=%ld) from %s:%d", + CDEBUG5(gras_trp_meas,"Recvd %ld of %lu (msg_size=%ld) from %s:%d", exp_sofar,exp_size,msg_size, gras_socket_peer_name(peer), gras_socket_peer_port(peer)); (peer->plugin->raw_recv)(peer,chunk,msg_size); } - CDEBUG5(trp_meas,"Recvd %ld of %lu (msg_size=%ld) from %s:%d", + CDEBUG5(gras_trp_meas,"Recvd %ld of %lu (msg_size=%ld) from %s:%d", exp_sofar,exp_size,msg_size, gras_socket_peer_name(peer), gras_socket_peer_port(peer)); @@ -486,7 +486,7 @@ gras_socket_t gras_socket_meas_accept(gras_socket_t peer){ res = (peer->plugin->socket_accept)(peer); res->meas = peer->meas; - CDEBUG1(trp_meas,"meas_accepted onto %d",res->sd); + CDEBUG1(gras_trp_meas,"meas_accepted onto %d",res->sd); return res; } diff --git a/src/gras/Transport/transport_plugin_file.c b/src/gras/Transport/transport_plugin_file.c index 0d6f7ab0da..5642aee02e 100644 --- a/src/gras/Transport/transport_plugin_file.c +++ b/src/gras/Transport/transport_plugin_file.c @@ -11,7 +11,7 @@ #include "transport_private.h" #include "xbt/ex.h" -XBT_LOG_NEW_DEFAULT_SUBCATEGORY(trp_file,transport, +XBT_LOG_NEW_DEFAULT_SUBCATEGORY(gras_trp_file,gras_trp, "Pseudo-transport to write to/read from a file"); /*** diff --git a/src/gras/Transport/transport_plugin_sg.c b/src/gras/Transport/transport_plugin_sg.c index d90c36f92b..acf757acb9 100644 --- a/src/gras/Transport/transport_plugin_sg.c +++ b/src/gras/Transport/transport_plugin_sg.c @@ -18,8 +18,7 @@ #include "transport_private.h" #include "gras/Virtu/virtu_sg.h" -XBT_LOG_EXTERNAL_CATEGORY(transport); -XBT_LOG_NEW_DEFAULT_SUBCATEGORY(trp_sg,transport,"SimGrid pseudo-transport"); +XBT_LOG_NEW_DEFAULT_SUBCATEGORY(gras_trp_sg,gras_trp,"SimGrid pseudo-transport"); /*** *** Prototypes diff --git a/src/gras/Transport/transport_plugin_tcp.c b/src/gras/Transport/transport_plugin_tcp.c index 25ce3214b7..0d2339602e 100644 --- a/src/gras/Transport/transport_plugin_tcp.c +++ b/src/gras/Transport/transport_plugin_tcp.c @@ -26,7 +26,7 @@ #define MIN(a,b) ((a)<(b)?(a):(b)) #endif -XBT_LOG_NEW_DEFAULT_SUBCATEGORY(trp_tcp,transport, +XBT_LOG_NEW_DEFAULT_SUBCATEGORY(gras_trp_tcp,gras_trp, "TCP buffered transport"); /*** @@ -339,7 +339,7 @@ gras_trp_bufiov_flush(gras_socket_t sock) { DEBUG0("Flush"); if (data->out == buffering_buf) { - if (XBT_LOG_ISENABLED(trp_tcp,xbt_log_priority_debug)) + if (XBT_LOG_ISENABLED(gras_trp_tcp,xbt_log_priority_debug)) hexa_print("chunk to send ", (unsigned char *) data->out_buf.data,data->out_buf.size); if ((data->out_buf.size - data->out_buf.pos) != 0) { diff --git a/src/gras/Virtu/process.c b/src/gras/Virtu/process.c index 9b6c65c62f..1e69da5396 100644 --- a/src/gras/Virtu/process.c +++ b/src/gras/Virtu/process.c @@ -17,8 +17,8 @@ #include "gras/Virtu/virtu_private.h" -XBT_LOG_NEW_SUBCATEGORY(virtu,gras,"Virtualization code"); -XBT_LOG_NEW_DEFAULT_SUBCATEGORY(process,virtu,"Process manipulation code"); +XBT_LOG_NEW_SUBCATEGORY(gras_virtu,gras,"Virtualization code"); +XBT_LOG_NEW_DEFAULT_SUBCATEGORY(gras_virtu_process,gras_virtu,"Process manipulation code"); /* Functions to handle gras_procdata_t->libdata cells*/ diff --git a/src/gras/Virtu/rl_emul.c b/src/gras/Virtu/rl_emul.c index c6b8d3c5d7..908268d4fa 100644 --- a/src/gras/Virtu/rl_emul.c +++ b/src/gras/Virtu/rl_emul.c @@ -11,7 +11,7 @@ #include "gras/Virtu/virtu_rl.h" #include "gras_modinter.h" -XBT_LOG_NEW_SUBCATEGORY(emul,gras,"Emulation support"); +XBT_LOG_NEW_SUBCATEGORY(gras_virtu_emul,gras_virtu,"Emulation support"); /*** Timing macros: nothing to do in RL. Actually do the job and shutup ***/ diff --git a/src/gras/Virtu/rl_time.c b/src/gras/Virtu/rl_time.c index b229c35cf0..1941d779cc 100644 --- a/src/gras/Virtu/rl_time.c +++ b/src/gras/Virtu/rl_time.c @@ -16,8 +16,7 @@ #include "gras/virtu.h" #include "xbt/xbt_portability.h" /* private */ -XBT_LOG_EXTERNAL_CATEGORY(virtu); -XBT_LOG_DEFAULT_CATEGORY(virtu); +XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(gras_virtu); double gras_os_time() { return xbt_os_time(); diff --git a/src/gras/Virtu/sg_emul.c b/src/gras/Virtu/sg_emul.c index 588427834d..b7f4d45719 100644 --- a/src/gras/Virtu/sg_emul.c +++ b/src/gras/Virtu/sg_emul.c @@ -15,7 +15,7 @@ #include "xbt/dict.h" #include "xbt/ex.h" -XBT_LOG_NEW_DEFAULT_SUBCATEGORY(emul,gras,"Emulation support"); +XBT_LOG_NEW_DEFAULT_SUBCATEGORY(gras_virtu_emul,gras_virtu,"Emulation support"); /*** Timing macros ***/ static xbt_os_timer_t timer; diff --git a/src/gras/Virtu/sg_process.c b/src/gras/Virtu/sg_process.c index 2ad07e2a17..12558775c9 100644 --- a/src/gras/Virtu/sg_process.c +++ b/src/gras/Virtu/sg_process.c @@ -13,8 +13,7 @@ #include "gras/Msg/msg_interface.h" /* For some checks at simulation end */ #include "gras/Transport/transport_interface.h" /* For some checks at simulation end */ -XBT_LOG_EXTERNAL_CATEGORY(process); -XBT_LOG_DEFAULT_CATEGORY(process); +XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(gras_virtu_proc); void gras_process_init() {