-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathperf.yml
42 lines (40 loc) · 1.47 KB
/
perf.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
GENERATOR:
PackageName: gen
PackageDescription: "Package gen provides automatically generated Go bindings for the Linux perf event subsystem."
PackageLicense: "THE AUTOGENERATED LICENSE. ALL THE RIGHTS ARE RESERVED BY ROBOTS."
SysIncludes: [linux/perf_event.h]
PARSER:
IncludePaths: [/usr/include]
SourcesPaths: [perf.h]
TRANSLATOR:
ConstRules:
defines: expand
enum: cgo
Rules:
global:
- {action: accept, from: "^perf_event_"}
const:
- {action: accept, from: "^PERF_"}
- {action: replace, from: "^PERF_", to: ""}
- {transform: lower}
- {action: replace, from: "_cpu_", to: "_CPU_"}
- {action: replace, from: "_cpumode_", to: "_CPUMode_"}
- {action: replace, from: "_hw_", to: "_HW_"}
- {action: replace, from: "_abi_", to: "_ABI_"}
- {action: replace, from: "_sw_", to: "_SW_"}
- {action: replace, from: "_id", to: "_ID"}
- {action: replace, from: "_hv", to: "_HV"}
- {load: snakecase}
- {transform: export}
type:
- {action: accept, from: "^perf_event_"}
- {action: replace, from: "^perf_event_", to: ""}
- {action: replace, from: "pmc_", to: "PMC_"}
- {action: replace, from: "_id$", to: "_ID"}
- {action: replace, from: "_id_", to: "_ID_"}
- {action: replace, from: "_hv", to: "_HV"}
- {action: replace, from: "_ip", to: "_IP"}
- {action: replace, from: "clockid", to: "ClockID"}
- {load: snakecase}
- {transform: export}