1 /******************************************************************************
4 * Interface for enabling system wide profiling based on hardware performance
7 * Copyright (C) 2005 Hewlett-Packard Co.
8 * Written by Aravind Menon & Jose Renato Santos
11 #ifndef __XEN_PUBLIC_XENOPROF_H__
12 #define __XEN_PUBLIC_XENOPROF_H__
15 * Commands to HYPERVISOR_xenoprof_op().
17 #define XENOPROF_init 0
18 #define XENOPROF_reset_active_list 1
19 #define XENOPROF_reset_passive_list 2
20 #define XENOPROF_set_active 3
21 #define XENOPROF_set_passive 4
22 #define XENOPROF_reserve_counters 5
23 #define XENOPROF_counter 6
24 #define XENOPROF_setup_events 7
25 #define XENOPROF_enable_virq 8
26 #define XENOPROF_start 9
27 #define XENOPROF_stop 10
28 #define XENOPROF_disable_virq 11
29 #define XENOPROF_release_counters 12
30 #define XENOPROF_shutdown 13
31 #define XENOPROF_get_buffer 14
32 #define XENOPROF_last_op 14
34 #define MAX_OPROF_EVENTS 32
35 #define MAX_OPROF_DOMAINS 25
36 #define XENOPROF_CPU_TYPE_SIZE 64
38 /* Xenoprof performance events (not Xen events) */
45 /* Xenoprof buffer shared between Xen and domain - 1 per VCPU */
52 uint64_t kernel_samples;
53 uint64_t user_samples;
54 uint64_t lost_samples;
55 struct event_log event_log[1];
57 typedef struct xenoprof_buf xenoprof_buf_t;
58 DEFINE_XEN_GUEST_HANDLE(xenoprof_buf_t);
60 struct xenoprof_init {
63 char cpu_type[XENOPROF_CPU_TYPE_SIZE];
65 typedef struct xenoprof_init xenoprof_init_t;
66 DEFINE_XEN_GUEST_HANDLE(xenoprof_init_t);
68 struct xenoprof_get_buffer {
74 typedef struct xenoprof_get_buffer xenoprof_get_buffer_t;
75 DEFINE_XEN_GUEST_HANDLE(xenoprof_get_buffer_t);
77 struct xenoprof_counter {
87 typedef struct xenoprof_counter xenoprof_counter_t;
88 DEFINE_XEN_GUEST_HANDLE(xenoprof_counter_t);
90 typedef struct xenoprof_passive {
97 DEFINE_XEN_GUEST_HANDLE(xenoprof_passive_t);
100 #endif /* __XEN_PUBLIC_XENOPROF_H__ */
108 * indent-tabs-mode: nil