HPCToolkit
perf_constants.h
Go to the documentation of this file.
1 // -*-Mode: C++;-*- // technically C99
2 
3 // * BeginRiceCopyright *****************************************************
4 //
5 // $HeadURL$
6 // $Id$
7 //
8 // --------------------------------------------------------------------------
9 // Part of HPCToolkit (hpctoolkit.org)
10 //
11 // Information about sources of support for research and development of
12 // HPCToolkit is at 'hpctoolkit.org' and in 'README.Acknowledgments'.
13 // --------------------------------------------------------------------------
14 //
15 // Copyright ((c)) 2002-2019, Rice University
16 // All rights reserved.
17 //
18 // Redistribution and use in source and binary forms, with or without
19 // modification, are permitted provided that the following conditions are
20 // met:
21 //
22 // * Redistributions of source code must retain the above copyright
23 // notice, this list of conditions and the following disclaimer.
24 //
25 // * Redistributions in binary form must reproduce the above copyright
26 // notice, this list of conditions and the following disclaimer in the
27 // documentation and/or other materials provided with the distribution.
28 //
29 // * Neither the name of Rice University (RICE) nor the names of its
30 // contributors may be used to endorse or promote products derived from
31 // this software without specific prior written permission.
32 //
33 // This software is provided by RICE and contributors "as is" and any
34 // express or implied warranties, including, but not limited to, the
35 // implied warranties of merchantability and fitness for a particular
36 // purpose are disclaimed. In no event shall RICE or contributors be
37 
38 #ifndef __PERF_CONSTANTS_H__
39 #define __PERF_CONSTANTS_H__
40 
41 #include <unistd.h>
42 #include <sys/types.h>
43 
44 #include <linux/types.h>
45 #include <linux/perf_event.h>
46 
47 
48 /******************************************************************************
49  * macros
50  *****************************************************************************/
51 
52 #define THREAD_SELF 0
53 #define CPU_ANY -1
54 #define GROUP_FD -1
55 #define PERF_FLAGS 0
56 #define PERF_REQUEST_0_SKID 2
57 #define PERF_WAKEUP_EACH_SAMPLE 1
58 
59 #define EXCLUDE 1
60 #define INCLUDE 0
61 
62 #define EXCLUDE_CALLCHAIN EXCLUDE
63 #define INCLUDE_CALLCHAIN INCLUDE
64 
65 #ifndef HPCRUN_DEFAULT_SAMPLE_RATE
66 #define HPCRUN_DEFAULT_SAMPLE_RATE 300
67 #endif
68 
69 #ifndef u32
70 typedef __u32 u32;
71 #endif
72 
73 
74 #ifndef u64
75 typedef __u64 u64;
76 #endif
77 
78 
79 #endif
__u32 u32
__u64 u64