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.


Basic HRT startup for HVM, plus assorted cleanup
[palacios.git] / palacios / include / palacios / vmm_pmu_telemetry.h
1 /*
2  * This file is part of the Palacios Virtual Machine Monitor developed
3  * by the V3VEE Project with funding from the United States National 
4  * Science Foundation and the Department of Energy.  
5  *
6  * The V3VEE Project is a joint project between Northwestern University
7  * and the University of New Mexico.  You can find out more at 
8  * http://www.v3vee.org
9  *
10  * Copyright (c) 2013, The V3VEE Project <http://www.v3vee.org> 
11  * All rights reserved.
12  *
13  * Author: Chang S. Bae <chang.bae@eecs.northwestern.edu>
14  *         Peter Dinda <pdinda@northwestern.edu>
15  *
16  * This is free software.  You are permitted to use,
17  * redistribute, and modify it as specified in the file "V3VEE_LICENSE".
18  */
19
20 #ifndef __VMM_PMU_TELEMETRY_H__
21 #define __VMM_PMU_TELEMETRY_H__
22
23 #ifdef __V3VEE__
24
25 #ifdef V3_CONFIG_PMU_TELEMETRY
26
27 #include <interfaces/vmm_pmu.h>
28 #include <palacios/vmm_list.h>
29
30 struct guest_info;
31
32 #define PMU_NUM_COUNTERS         6
33
34 struct v3_core_pmu_telemetry {
35   enum {AWAIT_FIRST_ENTRY=0, AWAIT_ENTRY, AWAIT_EXIT} state;
36   uint8_t       active_counters[PMU_NUM_COUNTERS];
37   uint64_t      guest_counts[PMU_NUM_COUNTERS];
38   uint64_t      host_counts[PMU_NUM_COUNTERS];
39   uint64_t      last_snapshot[PMU_NUM_COUNTERS];
40   uint64_t      guest_ucpi_estimate; // cycles per instruction * 1e6
41   uint64_t      guest_umpl_estimate; // cache misses per load * 1e6 
42   uint64_t      host_ucpi_estimate; // cycles per instruction * 1e6
43   uint64_t      host_umpl_estimate; // cache misses per load * 1e6 
44 };
45
46
47 void v3_pmu_telemetry_start(struct guest_info *info);
48 void v3_pmu_telemetry_enter(struct guest_info *info);
49 void v3_pmu_telemetry_exit(struct guest_info *info);
50 void v3_pmu_telemetry_end(struct guest_info *info);
51
52
53 #endif
54 #endif
55 #endif