Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Minor cleanup in memory tracking
Peter Dinda [Mon, 30 Jun 2014 22:35:59 +0000 (17:35 -0500)]
linux_module/memtrack.c
palacios/src/palacios/vmm_mem_track.c

index 367a473..b64ab29 100644 (file)
@@ -89,15 +89,15 @@ static int memtrack_snap(struct v3_guest *guest,
     header_size = (uint64_t)&(temp.core[0]) - (uint64_t)&temp;
     core_header_size = (uint64_t)&(ctemp.access_bitmap) - (uint64_t)&ctemp;
 
-    INFO("offset_to_num_cores=%llu header_size=%llu core_header_size=%llu\n",
-        offset_to_num_cores, header_size, core_header_size);
+    //    INFO("offset_to_num_cores=%llu header_size=%llu core_header_size=%llu\n",
+    //  offset_to_num_cores, header_size, core_header_size);
     
     if (copy_from_user(&num_cores,((void __user *)arg) + offset_to_num_cores,sizeof(num_cores))) { 
        ERROR("palacios: cannot copy number of cores from user\n");
        goto fail;
     }
     
-    INFO("num_cores=%u",num_cores);
+    //INFO("num_cores=%u",num_cores);
 
     if (!(user_snap=palacios_alloc(sizeof(v3_mem_track_snapshot) + num_cores * sizeof(struct v3_core_mem_track)))) {
        ERROR("palacios: cannot allocate memory for copying user snapshot\n");
@@ -116,8 +116,8 @@ static int memtrack_snap(struct v3_guest *guest,
        goto fail;
     }
 
-    INFO("snapshot: numcores=%u, core[0].num_pages=%llu, request_numcores=%u\n", 
-        sys_snap->num_cores, sys_snap->core[0].num_pages, num_cores);
+    //INFO("snapshot: numcores=%u, core[0].num_pages=%llu, request_numcores=%u\n", 
+    // sys_snap->num_cores, sys_snap->core[0].num_pages, num_cores);
 
     // Copy the meta data
     if (copy_to_user((void __user *)arg, sys_snap, header_size)) {
index 864f74d..cf73daf 100644 (file)
@@ -341,12 +341,14 @@ v3_mem_track_snapshot *v3_mem_track_take_snapshot(struct v3_vm_info *vm)
        s->core[i].num_pages=vm->cores[i].memtrack_state.num_pages;
        memcpy(s->core[i].access_bitmap,vm->cores[i].memtrack_state.access_bitmap,CEIL_DIV(vm->cores[i].memtrack_state.num_pages,8));
        PrintDebug(vm,VCORE_NONE,"memtrack: copied %llu bytes\n",CEIL_DIV(vm->cores[i].memtrack_state.num_pages,8));
+#ifdef V3_CONFIG_DEBUG_MEM_TRACK
        uint64_t j, sum;
        sum=0;
        for (j=0;j<CEIL_DIV(vm->cores[i].memtrack_state.num_pages,8);j++) {
-           sum+=!!vm->cores[i].memtrack_state.access_bitmap[i];
+           sum+=!!vm->cores[i].memtrack_state.access_bitmap[j];
        }
        PrintDebug(vm,VCORE_NONE,"memtrack: have %llu nonzero bytes\n",sum);
+#endif
     }
     
     return s;