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.
6 * The V3VEE Project is a joint project between Northwestern University
7 * and the University of New Mexico. You can find out more at
10 * Copyright (c) 2013, The V3VEE Project <http://www.v3vee.org>
11 * All rights reserved.
13 * Author: Chang S. Bae <chang.bae@eecs.northwestern.edu>
15 * This is free software. You are permitted to use,
16 * redistribute, and modify it as specified in the file "V3VEE_LICENSE".
22 #include <palacios/vmm_types.h>
29 * The following is the set of performance
30 * counters available in Palacios. The implementation
31 * of the interface translates these names to
32 * the underlying counters needed on the specific platform
35 V3_PMON_RETIRED_INST_COUNT=0,
37 V3_PMON_MEM_LOAD_COUNT,
38 V3_PMON_MEM_STORE_COUNT,
39 V3_PMON_CACHE_MISS_COUNT,
40 V3_PMON_TLB_MISS_COUNT
42 //V3_PMON_TLB_INVALIDATION_COUNT
43 /* you can add more here, but then need to implement them
50 /* init/deinit pmu data on the core on which it is called */
56 // Request tracking of a counter, returns -1 if it is not possible
57 int (*start_tracking)(v3_pmon_ctr_t ctr);
58 // Get the counter value, provided it being tracked
59 uint64_t (*get_value)(v3_pmon_ctr_t ctr);
60 // Stop tracking a counter
61 int (*stop_tracking)(v3_pmon_ctr_t ctr);
70 extern void V3_Init_PMU(struct v3_pmu_iface * palacios_pmu);
74 /* This is a PER PHYSICAL CORE init/deinit */
75 void v3_pmu_init(void);
77 // Call these after an init
78 int v3_pmu_start_tracking(v3_pmon_ctr_t ctr);
79 int v3_pmu_stop_tracking(v3_pmon_ctr_t ctr);
80 uint64_t v3_pmu_get_value(v3_pmon_ctr_t ctr);
82 // Call this after you are done with the PMU
83 void v3_pmu_deinit(void);