Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix get_phys_host
authorTakahiro Hirofuchi <thirofuchi@debian.(none)>
Mon, 4 Feb 2013 12:03:05 +0000 (13:03 +0100)
committerTakahiro Hirofuchi <thirofuchi@debian.(none)>
Mon, 4 Feb 2013 12:03:05 +0000 (13:03 +0100)
src/msg/msg_vm.c
src/simix/smx_user.c

index d206d40..2e14d5a 100644 (file)
@@ -245,10 +245,16 @@ void MSG_vm_migrate(msg_vm_t vm, msg_host_t destination)
    *   
    */
 
+  #ifdef HAVE_TRACING
+  const char *old_pm_name = simcall_vm_get_phys_host(vm);
+  msg_host_t old_pm_ind  = xbt_lib_get_elm_or_null(host_lib, old_pm_name);
+  #endif
+
   simcall_vm_migrate(vm, destination);
 
+
   #ifdef HAVE_TRACING
-  // TRACE_msg_vm_change_host(vm, vm->location, destination);
+  TRACE_msg_vm_change_host(vm, old_pm_ind, destination);
   #endif
 
 #if 0
index bfc9a3e..016f7ab 100644 (file)
@@ -296,6 +296,12 @@ void simcall_vm_migrate(smx_host_t vm, smx_host_t dst_phys)
   simcall_BODY_vm_migrate(vm, dst_phys);
 }
 
+const char *simcall_vm_get_phys_host(smx_host_t vm)
+{
+  /* will jump to SIMIX_pre_vm_migrate */
+  simcall_BODY_vm_get_phys_host(vm);
+}
+
 void simcall_vm_suspend(smx_host_t vm)
 {
   /* will jump to SIMIX_pre_vm_suspend */