From: Martin Quinson Date: Tue, 2 Oct 2012 08:13:09 +0000 (+0200) Subject: Deprecate Msg.clean() X-Git-Tag: v3_9_90~569^2~19^2~9^2~24 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/812716e4be0bbef239a1c53fcecbf8e0cc2c068e?hp=cbe8c21df78eb20ffd36c0bac250685f490244c5 Deprecate Msg.clean() --- diff --git a/ChangeLog b/ChangeLog index a57680eb2c..756275795e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,7 +11,8 @@ SimGrid-java (3.8) unstable; urgency=low * Add Process.setAutoRestart: handling of process restart when failed host comes back. * Add Process.getProperty, Host.getProperty, Host.getProperty: allows - you to retrieve the properties of the processes/hosts + you to retrieve the properties of the processes/hosts + * Deprecate Msg.clean(): you can just forget about it now. * New context factory based on Coroutines. It mandates a modified JVM but then, the simulations run about five times faster, and there is diff --git a/examples/cloud/Cloud.java b/examples/cloud/Cloud.java index 6cdd6acb43..1edb24b9bd 100644 --- a/examples/cloud/Cloud.java +++ b/examples/cloud/Cloud.java @@ -37,6 +37,5 @@ public class Cloud { /* Execute the simulation */ Msg.run(); - Msg.clean(); } } \ No newline at end of file diff --git a/examples/tracing/TracingTest.java b/examples/tracing/TracingTest.java index 93b76f3de1..380b0a8ed0 100644 --- a/examples/tracing/TracingTest.java +++ b/examples/tracing/TracingTest.java @@ -42,6 +42,5 @@ public class TracingTest { /* execute the simulation. */ Msg.run(); - Msg.clean(); } } diff --git a/org/simgrid/msg/Msg.java b/org/simgrid/msg/Msg.java index adb58c5c03..4cbf037478 100644 --- a/org/simgrid/msg/Msg.java +++ b/org/simgrid/msg/Msg.java @@ -84,18 +84,9 @@ public final class Msg { */ public final static native void run() ; - /** - * Cleanup the MSG simulation. - * - * This function is only useful if you want to chain the simulations within - * the same environment. But actually, it's not sure at all that cleaning the - * JVM is faster than restarting a new one, so it's probable that using this - * function is not a brilliant idea. Do so at own risk. - * - * @see MSG_clean - */ - public final static native void clean(); - + /** This function is useless nowadays, just stop calling it. */ + @Deprecated + public final static void clean(){} /** * The native implemented method to create the environment of the simulation. diff --git a/src/jmsg.c b/src/jmsg.c index 37c77b30d8..97ba952549 100644 --- a/src/jmsg.c +++ b/src/jmsg.c @@ -156,15 +156,6 @@ JNIEXPORT void JNICALL xbt_dynar_free(&hosts); XBT_INFO("Clean native world"); } -JNIEXPORT void JNICALL - JNICALL Java_org_simgrid_msg_Msg_clean(JNIEnv * env, jclass cls) -{ - /* cleanup native stuff. Calling it is ... useless since leaking memory at the end of the simulation is a non-issue */ - msg_error_t rv = MSG_OK != MSG_clean(); - jxbt_check_res("MSG_clean()", rv, MSG_OK, - bprintf - ("unexpected error : MSG_clean() failed .. please report this bug ")); -} JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_createEnvironment(JNIEnv * env, jclass cls, diff --git a/src/jmsg.h b/src/jmsg.h index e614876a0d..73e9ad9460 100644 --- a/src/jmsg.h +++ b/src/jmsg.h @@ -31,12 +31,6 @@ JNIEXPORT jdouble JNICALL Java_org_simgrid_msg_Msg_getClock(JNIEnv *, jclass); */ JNIEXPORT void JNICALL JNICALL Java_org_simgrid_msg_Msg_run(JNIEnv * env, jclass cls); -/** - * Class org_simgrid_msg_Msg - * Method clean - */ -JNIEXPORT void JNICALL - JNICALL Java_org_simgrid_msg_Msg_clean(JNIEnv * env, jclass cls); JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_init(JNIEnv * env, jclass cls, jobjectArray jargs);