ChangeLog for SimGrid-java, before its integration into the main source tree.
+SimGrid (3.13) UNRELEASED; urgency=low
+
+ Backwards Compatibility breaks
+ - VM.setBound(int load) is now VM.setBound(double bound) to meet the MSG semantics. Use VM.getSpeed()*load/100 for the legacy behavior.
+
+
SimGrid-java (3.9) stable; urgency=low
-- 2013-01-30 Da SimGrid team <simgrid-devel@lists.gforge.inria.fr>
}
JNIEXPORT void JNICALL
-Java_org_simgrid_msg_VM_setBound(JNIEnv *env, jobject jvm, jint load) {
+Java_org_simgrid_msg_VM_setBound(JNIEnv *env, jobject jvm, jdouble bound) {
msg_vm_t vm = jvm_get_native(env,jvm);
- double bound = MSG_get_host_speed(vm) * load / 100;
- MSG_vm_set_bound(vm, bound);
+ MSG_vm_set_bound(vm, bound);
}
JNIEXPORT void JNICALL
msg_vm_t vm = jvm_get_native(env,jvm);
MSG_vm_restore(vm);
}
-
-
-
-JNIEXPORT jobject JNICALL
-Java_org_simgrid_msg_VM_get_pm(JNIEnv *env, jobject jvm) {
- jobject jhost;
- msg_vm_t vm = jvm_get_native(env,jvm);
- msg_host_t host = MSG_vm_get_pm(vm);
-
- if (!host->extension(JAVA_HOST_LEVEL)) {
- THROW_DEADCODE;
- /* the native host not yet associated with the java host instance */
-
- /* instanciate a new java host instance */
- jhost = jhost_new_instance(env);
-
- if (!jhost) {
- jxbt_throw_jni(env, "java host instantiation failed");
- return NULL;
- }
-
- /* get a global reference to the newly created host */
- jhost = jhost_ref(env, jhost);
-
- if (!jhost) {
- jxbt_throw_jni(env, "global ref allocation failed");
- return NULL;
- }
- /* Sets the host name */
- const char *name = MSG_host_get_name(host);
- jobject jname = env->NewStringUTF(name);
- env->SetObjectField(jhost, jxbt_get_jfield(env,
- env->FindClass("org/simgrid/msg/Host"), "name", "Ljava/lang/String;"),
- jname);
- /* Bind & store it */
- jhost_bind(jhost, host, env);
- host->extension_set(JAVA_HOST_LEVEL, (void *) jhost);
- } else {
- jhost = (jobject) host->extension(JAVA_HOST_LEVEL);
- }
-
- return jhost;
-}
/**
* Class org_simgrid_msg_VM
* Method setBound
- * Signature ()B
+ * Signature (D)B
*/
JNIEXPORT void JNICALL
-Java_org_simgrid_msg_VM_setBound(JNIEnv *env, jobject jvm, jint load);
+Java_org_simgrid_msg_VM_setBound(JNIEnv *env, jobject jvm, jdouble bound);
/**
* Class org_simgrid_msg_VM
Java_org_simgrid_msg_VM_save(JNIEnv *env, jobject jvm);
/**
* Class org_simgrid_msg_VM
- * Method save
+ * Method restore
* Signature ()V
*/
JNIEXPORT void JNICALL
Java_org_simgrid_msg_VM_restore(JNIEnv *env, jobject jvm);
-JNIEXPORT jobject JNICALL
-Java_org_simgrid_msg_VM_get_pm(JNIEnv *env, jobject jvm);
-
SG_END_DECL()
#endif