Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge before commiting VM changes - Adrien
authorAdrien Lebre <alebre@adsein-4.local>
Wed, 8 Apr 2015 11:27:25 +0000 (13:27 +0200)
committerAdrien Lebre <alebre@adsein-4.local>
Wed, 8 Apr 2015 11:27:25 +0000 (13:27 +0200)
1  2 
src/bindings/java/jmsg_vm.c
src/bindings/java/org/simgrid/msg/VM.java
src/msg/msg_vm.c
src/surf/vm_workstation_hl13.cpp

@@@ -125,11 -125,11 +125,13 @@@ JNIEXPORT void JNICAL
  Java_org_simgrid_msg_VM_internalmig(JNIEnv *env, jobject jvm, jobject jhost) {
    msg_vm_t vm = jvm_get_native(env,jvm);
    msg_host_t host = jhost_get_native(env, jhost);
++  xbt_ex_t e;
    TRY{
    MSG_vm_migrate(vm,host);
--  } CATCH_ANONYMOUS{
--      XBT_INFO("CATCH EXCEPTION MIGRATION");
--      jxbt_throw_host_failure(env, (char*)"during migration");
++  } CATCH(e){
++     XBT_INFO("CATCH EXCEPTION MIGRATION %s",e.msg);
++     xbt_ex_free(e);
++     jxbt_throw_host_failure(env, (char*)"during migration");
    } 
  }
  
@@@ -814,7 -803,7 +803,7 @@@ static int migration_tx_fun(int argc, c
      sg_size_t sent = 0;
      double clock_prev_send = MSG_get_clock();
      TRY {
--      XBT_INFO("Stage 2, gonna send %llu", updated_size);
++      XBT_DEBUG("Stage 2, gonna send %llu", updated_size);
        sent = send_migration_data(ms->vm, ms->src_pm, ms->dst_pm, updated_size, ms->mbox, 2, stage2_round, mig_speed, mig_timeout);
      } CATCH_ANONYMOUS {
        //hostfailure (if you want to know whether this is the SRC or the DST please check directly in send_migration_data code)
@@@ -858,7 -847,7 +847,7 @@@ stage3
    stop_dirty_page_tracking(ms->vm);
  
    TRY {
--    XBT_INFO("Stage 3: Gonna send %f", remaining_size);
++    XBT_DEBUG("Stage 3: Gonna send %f", remaining_size);
      send_migration_data(ms->vm, ms->src_pm, ms->dst_pm, remaining_size, ms->mbox, 3, 0, mig_speed, -1);
    } CATCH_ANONYMOUS {
      //hostfailure (if you want to know whether this is the SRC or the DST please check directly in send_migration_data code)
    }
  
    // At that point the Migration is considered valid for the SRC node but remind that the DST side should relocate effectively the VM on the DST node.
--  XBT_INFO("mig: tx_done");
++  XBT_DEBUG("mig: tx_done");
  
    return 0;
  }
@@@ -975,12 -964,6 +964,12 @@@ void MSG_vm_migrate(msg_vm_t vm, msg_ho
  
    msg_host_t old_pm = simcall_vm_get_pm(vm);
  
-   if(!MSG_host_is_off(old_pm))
++  if(MSG_host_is_off(old_pm))
 +    THROWF(vm_error, 0, "SRC host(%s) seems off, cannot start a migration", sg_host_name(old_pm));
 + 
-   if(!MSG_host_is_off(new_pm))
++  if(MSG_host_is_off(new_pm))
 +    THROWF(vm_error, 0, "DST host(%s) seems off, cannot start a migration", sg_host_name(new_pm));
 +  
    if (!MSG_vm_is_running(vm))
      THROWF(vm_error, 0, "VM(%s) is not running", sg_host_name(vm));
  
@@@ -385,7 -385,7 +385,7 @@@ void WorkstationVMHL13::migrate(surf_re
       /* keep the bound value of the cpu action of the VM. */
       double old_bound = p_action->getBound();
       if (old_bound != 0) {
--       XBT_INFO("migrate VM(%s): set bound (%f) at %s", vm_name, old_bound, pm_name_dst);
++       XBT_DEBUG("migrate VM(%s): set bound (%f) at %s", vm_name, old_bound, pm_name_dst);
         new_cpu_action->setBound(old_bound);
       }