~ubuntu-branches/ubuntu/utopic/xen/utopic

« back to all changes in this revision

Viewing changes to xen/include/asm-x86/xenoprof.h

  • Committer: Bazaar Package Importer
  • Author(s): Bastian Blank
  • Date: 2010-05-06 15:47:38 UTC
  • mto: (1.3.1) (15.1.1 sid) (4.1.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20100506154738-agoz0rlafrh1fnq7
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/******************************************************************************
 
2
 * asm-x86/xenoprof.h
 
3
 * xenoprof x86 arch specific header file
 
4
 *
 
5
 * Copyright (c) 2006 Isaku Yamahata <yamahata at valinux co jp>
 
6
 *                    VA Linux Systems Japan K.K.
 
7
 *
 
8
 * This program is free software; you can redistribute it and/or modify
 
9
 * it under the terms of the GNU General Public License as published by
 
10
 * the Free Software Foundation; either version 2 of the License, or
 
11
 * (at your option) any later version.
 
12
 *
 
13
 * This program is distributed in the hope that it will be useful,
 
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
16
 * GNU General Public License for more details.
 
17
 *
 
18
 * You should have received a copy of the GNU General Public License
 
19
 * along with this program; if not, write to the Free Software
 
20
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
21
 */
 
22
 
 
23
#ifndef __ASM_X86_XENOPROF_H__
 
24
#define __ASM_X86_XENOPROF_H__
 
25
 
 
26
int nmi_reserve_counters(void);
 
27
int nmi_setup_events(void);
 
28
int nmi_enable_virq(void);
 
29
int nmi_start(void);
 
30
void nmi_stop(void);
 
31
void nmi_disable_virq(void);
 
32
void nmi_release_counters(void);
 
33
 
 
34
int xenoprof_arch_init(int *num_events, char *cpu_type);
 
35
#define xenoprof_arch_reserve_counters()        nmi_reserve_counters()
 
36
#define xenoprof_arch_setup_events()            nmi_setup_events()
 
37
#define xenoprof_arch_enable_virq()             nmi_enable_virq()
 
38
#define xenoprof_arch_start()                   nmi_start()
 
39
#define xenoprof_arch_stop()                    nmi_stop()
 
40
#define xenoprof_arch_disable_virq()            nmi_disable_virq()
 
41
#define xenoprof_arch_release_counters()        nmi_release_counters()
 
42
 
 
43
int xenoprof_arch_counter(XEN_GUEST_HANDLE(void) arg);
 
44
int compat_oprof_arch_counter(XEN_GUEST_HANDLE(void) arg);
 
45
 
 
46
struct vcpu;
 
47
struct cpu_user_regs;
 
48
 
 
49
int xenoprofile_get_mode(struct vcpu *v, struct cpu_user_regs * const regs);
 
50
 
 
51
static inline int xenoprof_backtrace_supported(void)
 
52
{
 
53
    return 1;
 
54
}
 
55
 
 
56
void xenoprof_backtrace(
 
57
    struct domain *d, struct vcpu *vcpu, 
 
58
    struct cpu_user_regs *const regs, unsigned long depth, int mode);
 
59
 
 
60
#define xenoprof_shared_gmfn(d, gmaddr, maddr)                      \
 
61
    do {                                                            \
 
62
        (void)(maddr);                                              \
 
63
        gdprintk(XENLOG_WARNING,                                    \
 
64
                 "xenoprof/x86 with autotranslated mode enabled"    \
 
65
                 "isn't supported yet\n");                          \
 
66
    } while (0)
 
67
int passive_domain_do_rdmsr(struct cpu_user_regs *regs);
 
68
int passive_domain_do_wrmsr(struct cpu_user_regs *regs);
 
69
void passive_domain_destroy(struct vcpu *v);
 
70
 
 
71
#endif /* __ASM_X86_XENOPROF_H__ */
 
72
 
 
73
/*
 
74
 * Local variables:
 
75
 * mode: C
 
76
 * c-set-style: "BSD"
 
77
 * c-basic-offset: 4
 
78
 * tab-width: 4
 
79
 * indent-tabs-mode: nil
 
80
 * End:
 
81
 */