From: navarrop Date: Fri, 18 Feb 2011 18:44:36 +0000 (+0000) Subject: Rename DEBUG, INFO... for XBT_DEBUG ... in simgrid-java sources. X-Git-Tag: v3_9_90~569^2~19^2~202 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/93b7fb3201585c6c2734b41565cddd8ee9591146?hp=0caed14b9f53263281010fcf575340c149ff4264 Rename DEBUG, INFO... for XBT_DEBUG ... in simgrid-java sources. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/contrib/trunk/simgrid-java@9668 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/jmsg.c b/src/jmsg.c index 4b69122e58..2e8c1d5744 100644 --- a/src/jmsg.c +++ b/src/jmsg.c @@ -62,7 +62,7 @@ Java_org_simgrid_msg_MsgNative_processCreate(JNIEnv * env, jclass cls, m_process_t process; /* the native process to create */ m_host_t host; /* Where that process lives */ - DEBUG4("Java_org_simgrid_msg_MsgNative_processCreate(env=%p,cls=%p,jproc=%p,jhost=%p)", + XBT_DEBUG("Java_org_simgrid_msg_MsgNative_processCreate(env=%p,cls=%p,jproc=%p,jhost=%p)", env, cls, jprocess_arg, jhost); @@ -324,10 +324,10 @@ Java_org_simgrid_msg_MsgNative_hostGetByName(JNIEnv * env, jclass cls, /* get the C string from the java string */ const char *name = (*env)->GetStringUTFChars(env, jname, 0); - DEBUG1("Looking for host '%s'",name); + XBT_DEBUG("Looking for host '%s'",name); /* get the host by name (the hosts are created during the grid resolution) */ host = MSG_get_host_by_name(name); - DEBUG2("MSG gave %p as native host (simdata=%p)", host,host? host->simdata:NULL); + XBT_DEBUG("MSG gave %p as native host (simdata=%p)", host,host? host->simdata:NULL); if (!host) { /* invalid name */ jxbt_throw_host_not_found(env, name); @@ -815,16 +815,16 @@ JNIEXPORT void JNICALL jobject jhost; /* Run everything */ - INFO0("Ready to run MSG_MAIN"); + XBT_INFO("Ready to run MSG_MAIN"); rv = MSG_main(); - INFO0("Done running MSG_MAIN"); + XBT_INFO("Done running MSG_MAIN"); jxbt_check_res("MSG_main()", rv, MSG_OK, bprintf ("unexpected error : MSG_main() failed .. please report this bug ")); - INFO0("MSG_main finished"); + XBT_INFO("MSG_main finished"); - INFO0("Clean java world"); + XBT_INFO("Clean java world"); /* Cleanup java hosts */ hosts = MSG_get_host_table(); for (index = 0; index < MSG_get_host_number() - 1; index++) { @@ -834,7 +834,7 @@ JNIEXPORT void JNICALL } - INFO0("Clean native world"); + XBT_INFO("Clean native world"); /* cleanup native stuff */ rv = MSG_OK != MSG_clean(); jxbt_check_res("MSG_clean()", rv, MSG_OK, @@ -882,7 +882,7 @@ JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_info(JNIEnv * env, jclass cls, jstring js) { const char *s = (*env)->GetStringUTFChars(env, js, 0); - INFO1("%s", s); + XBT_INFO("%s", s); (*env)->ReleaseStringUTFChars(env, js, s); } diff --git a/src/jmsg_process.c b/src/jmsg_process.c index 6be9407677..c73bfb7032 100644 --- a/src/jmsg_process.c +++ b/src/jmsg_process.c @@ -122,9 +122,9 @@ void jprocess_start(jobject jprocess, JNIEnv * env) if (!id) return; - DEBUG2("jprocess_start(jproc=%p,env=%p)", jprocess, env); + XBT_DEBUG("jprocess_start(jproc=%p,env=%p)", jprocess, env); (*env)->CallVoidMethod(env, jprocess, id); - DEBUG0("jprocess started"); + XBT_DEBUG("jprocess started"); } m_process_t jprocess_to_native_process(jobject jprocess, JNIEnv * env) @@ -191,7 +191,7 @@ void jprocess_schedule(smx_context_t context) id = jxbt_get_smethod(env, "org/simgrid/msg/Process", "schedule", "()V"); if (!id) { - CRITICAL0("Cannot find java method org/simgrid/msg/Process/schedule()V"); + XBT_CRITICAL("Cannot find java method org/simgrid/msg/Process/schedule()V"); return; } diff --git a/src/smx_context_java.c b/src/smx_context_java.c index bd56c84078..5fe260fced 100644 --- a/src/smx_context_java.c +++ b/src/smx_context_java.c @@ -65,7 +65,7 @@ smx_ctx_java_factory_create_context(xbt_main_func_t code, int argc, void_pfn_smxprocess_t cleanup_func, void* data) { - DEBUG0("XXXX Create Context\n"); + XBT_DEBUG("XXXX Create Context\n"); smx_ctx_java_t context = xbt_new0(s_smx_ctx_java_t, 1); /* If the user provided a function for the process then use it @@ -106,7 +106,7 @@ static void smx_ctx_java_free(smx_context_t context) static void smx_ctx_java_stop(smx_context_t context) { jobject jprocess = NULL; - DEBUG0("XXXX Context Stop\n"); + XBT_DEBUG("XXXX Context Stop\n"); smx_ctx_java_t ctx_java; @@ -117,7 +117,7 @@ static void smx_ctx_java_stop(smx_context_t context) /*FIXME: is this really necessary? Seems to. */ if (my_current_context->iwannadie) { - INFO0("I wannadie"); + XBT_INFO("I wannadie"); /* The maestro call xbt_context_stop() with an exit code set to one */ if (ctx_java->jprocess) { /* if the java process is alive schedule it */ @@ -148,13 +148,13 @@ static void smx_ctx_java_suspend(smx_context_t context) // FIXME: inline those functions static void smx_ctx_java_resume(smx_context_t new_context) { - DEBUG0("XXXX Context Resume\n"); + XBT_DEBUG("XXXX Context Resume\n"); jprocess_schedule(new_context); } static void smx_ctx_java_runall(xbt_dynar_t processes) { - DEBUG0("XXXX Run all\n"); + XBT_DEBUG("XXXX Run all\n"); smx_process_t process; smx_context_t old_context; unsigned int cursor; @@ -167,5 +167,5 @@ static void smx_ctx_java_runall(xbt_dynar_t processes) } xbt_dynar_reset(processes); - DEBUG0("XXXX End of run all\n"); + XBT_DEBUG("XXXX End of run all\n"); }