From: mquinson Date: Sun, 28 May 2006 21:34:46 +0000 (+0000) Subject: Let's be really verbose about what gets copied on the socket X-Git-Tag: v3.3~3060 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/07c48b840765e90ae60a3c7f2d3ee466ed0a64b2 Let's be really verbose about what gets copied on the socket git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2298 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/gras/DataDesc/ddt_exchange.c b/src/gras/DataDesc/ddt_exchange.c index 4f0dcee643..effcd84d65 100644 --- a/src/gras/DataDesc/ddt_exchange.c +++ b/src/gras/DataDesc/ddt_exchange.c @@ -122,8 +122,8 @@ gras_datadesc_copy_rec(gras_cbps_t state, VERB4("Copy a %s (%s) from %p to %p", type->name, gras_datadesc_cat_names[type->category_code], - src,dst); - + src,dst); + if (type->send) { type->send(type,state,src); } @@ -157,6 +157,22 @@ gras_datadesc_copy_rec(gras_cbps_t state, VERB1("Copy field %s",field->name); count += gras_datadesc_copy_rec(state,refs,sub_type, field_src, field_dst, 0, detect_cycle || sub_type->cycle); + + if (XBT_LOG_ISENABLED(gras_ddt_exchange,xbt_log_priority_debug)) { + if (sub_type == gras_datadesc_by_name("unsigned int")) { + DEBUG2("Copied value for field %s: %d (type: unsigned int)",field->name, *(unsigned int*)field_dst); + } else if (sub_type == gras_datadesc_by_name("int")) { + DEBUG2("Copied value for field %s: %d (type: int)",field->name, *(int*)field_dst); + + } else if (sub_type == gras_datadesc_by_name("unsigned long int")) { + DEBUG2("Copied value for field %s: %ld (type: unsigned long int)",field->name, *(unsigned long int*)field_dst); + } else if (sub_type == gras_datadesc_by_name("long int")) { + DEBUG2("Copied value for field %s: %ld (type: long int)",field->name, *(long int*)field_dst); + + } else if (sub_type == gras_datadesc_by_name("string")) { + DEBUG2("Copied value for field %s: '%s' (type: string)", field->name, *(char**)field_dst); + } + } } VERB1("<< Copied all fields of the structure %s", type->name); @@ -338,6 +354,7 @@ gras_datadesc_copy_rec(gras_cbps_t state, default: xbt_assert0(0, "Invalid type"); } + return count; } /**