PAPI 7.1.0.0
Loading...
Searching...
No Matches
pfmlib_os_ia64.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2003-2006 Hewlett-Packard Development Company, L.P.
3 * Contributed by Stephane Eranian <eranian@hpl.hp.com>
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a copy
6 * of this software and associated documentation files (the "Software"), to deal
7 * in the Software without restriction, including without limitation the rights
8 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
9 * of the Software, and to permit persons to whom the Software is furnished to do so,
10 * subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included in all
13 * copies or substantial portions of the Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
16 * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
17 * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
18 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
19 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
20 * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 */
22#ifndef __PFMLIB_OS_IA64_H__
23#define __PFMLIB_OS_IA64_H__
24
25#ifndef __PFMLIB_OS_H__
26#error "you should never include this file directly, use pfmlib_os.h"
27#endif
28
29#include <perfmon/pfmlib_comp.h>
30
31#ifndef __ia64__
32#error "you should not be including this file"
33#endif
34
35/*
36 * you should never include this file directly, it is included from pfmlib.h
37 */
38
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43#ifdef __linux__
44
45#ifndef __PFMLIB_OS_COMPILE
46/*
47 * macros version of pfm_self_start/pfm_self_stop to be used in per-process self-monitoring sessions.
48 * they are also defined as real functions.
49 *
50 * DO NOT USE on system-wide sessions.
51 */
52static inline int
53pfm_self_start(int fd)
54{
55 fd = 0; /* avoid compiler warning */
56 ia64_sum();
57 return 0;
58}
59
60static inline int
61pfm_self_stop(int fd)
62{
63 fd = 0; /* avoid compiler warning */
64 ia64_rum();
65 return 0;
66}
67#endif /* __PFMLIB_OS_COMPILE */
68
69#endif /*__linux__ */
70
71#ifdef __cplusplus /* extern C */
72}
73#endif
74#endif /* __PFMLIB_OS_IA64_H__ */
static int pfm_self_stop(int fd)
static int pfm_self_start(int fd)