Hackfut Security File Manager
Current Path:
/usr/include/linux
usr
/
include
/
linux
/
📁
..
📄
a.out.h
(7.15 KB)
📄
acct.h
(3.41 KB)
📄
adb.h
(1.05 KB)
📄
adfs_fs.h
(856 B)
📄
affs_hardblocks.h
(1.45 KB)
📄
agpgart.h
(3.83 KB)
📄
aio_abi.h
(3.04 KB)
📄
apm_bios.h
(3.46 KB)
📄
arcfb.h
(150 B)
📄
atalk.h
(927 B)
📄
atm.h
(7.62 KB)
📄
atm_eni.h
(585 B)
📄
atm_he.h
(343 B)
📄
atm_idt77105.h
(892 B)
📄
atm_nicstar.h
(1.19 KB)
📄
atm_tcp.h
(1.5 KB)
📄
atm_zatm.h
(1.57 KB)
📄
atmapi.h
(889 B)
📄
atmarp.h
(1.2 KB)
📄
atmbr2684.h
(3.13 KB)
📄
atmclip.h
(513 B)
📄
atmdev.h
(7.42 KB)
📄
atmioc.h
(1.55 KB)
📄
atmlec.h
(2.5 KB)
📄
atmmpc.h
(4.07 KB)
📄
atmppp.h
(576 B)
📄
atmsap.h
(4.79 KB)
📄
atmsvc.h
(1.75 KB)
📄
audit.h
(15.51 KB)
📄
auto_fs.h
(2.29 KB)
📄
auto_fs4.h
(4.03 KB)
📄
auxvec.h
(1.35 KB)
📄
ax25.h
(2.69 KB)
📄
b1lli.h
(1.62 KB)
📄
baycom.h
(820 B)
📄
bfs_fs.h
(1.79 KB)
📄
binfmts.h
(565 B)
📄
blk_types.h
(6.94 KB)
📄
blkpg.h
(1.56 KB)
📄
blktrace_api.h
(4.37 KB)
📄
bpqether.h
(952 B)
📄
bsg.h
(2.33 KB)
📁
byteorder
📁
can
📄
can.h
(3.25 KB)
📄
capability.h
(10.34 KB)
📄
capi.h
(2.99 KB)
📄
cciss_ioctl.h
(5.69 KB)
📄
cdk.h
(12.47 KB)
📄
cdrom.h
(27.47 KB)
📄
cgroupstats.h
(2.1 KB)
📄
chio.h
(5.16 KB)
📄
cm4000_cs.h
(1.68 KB)
📄
cn_proc.h
(2.65 KB)
📄
coda.h
(17.08 KB)
📄
coda_psdev.h
(679 B)
📄
coff.h
(12.12 KB)
📄
comstats.h
(3.05 KB)
📄
connector.h
(2.08 KB)
📄
const.h
(682 B)
📄
cramfs_fs.h
(2.86 KB)
📄
cuda.h
(769 B)
📄
cyclades.h
(16.65 KB)
📄
cycx_cfm.h
(2.86 KB)
📄
dcbnl.h
(21.6 KB)
📄
dccp.h
(5.66 KB)
📄
dlm.h
(2.47 KB)
📄
dlm_device.h
(2.42 KB)
📄
dlm_netlink.h
(1.04 KB)
📄
dlm_plock.h
(806 B)
📄
dlmconstants.h
(4.9 KB)
📄
dm-ioctl.h
(10.42 KB)
📄
dm-log-userspace.h
(14.82 KB)
📄
dn.h
(4.42 KB)
📄
dqblk_xfs.h
(6.79 KB)
📁
dvb
📄
edd.h
(5.41 KB)
📄
efs_fs_sb.h
(2.11 KB)
📄
elf-em.h
(1.79 KB)
📄
elf-fdpic.h
(2.5 KB)
📄
elf.h
(10.97 KB)
📄
elfcore.h
(2.86 KB)
📄
errno.h
(79 B)
📄
errqueue.h
(443 B)
📄
ethtool.h
(33.37 KB)
📄
eventpoll.h
(1.32 KB)
📄
ext2_fs.h
(18.36 KB)
📄
fadvise.h
(855 B)
📄
falloc.h
(293 B)
📄
fb.h
(15.64 KB)
📄
fcntl.h
(1.57 KB)
📄
fd.h
(11.29 KB)
📄
fdreg.h
(5.23 KB)
📄
fib_rules.h
(1.42 KB)
📄
fiemap.h
(2.49 KB)
📄
filter.h
(3.45 KB)
📄
firewire-cdev.h
(24.47 KB)
📄
firewire-constants.h
(1.93 KB)
📄
flat.h
(2.04 KB)
📄
fs.h
(18.47 KB)
📄
fuse.h
(11.17 KB)
📄
futex.h
(4.79 KB)
📄
gameport.h
(816 B)
📄
gen_stats.h
(1.27 KB)
📄
generic_serial.h
(895 B)
📄
genetlink.h
(1.64 KB)
📄
gfs2_ondisk.h
(11.54 KB)
📄
gigaset_dev.h
(981 B)
📄
hayesesp.h
(230 B)
📁
hdlc
📄
hdlc.h
(574 B)
📄
hdlcdrv.h
(2.78 KB)
📄
hdreg.h
(22.11 KB)
📄
hid.h
(1.78 KB)
📄
hiddev.h
(6.12 KB)
📄
hidraw.h
(1.19 KB)
📄
hpet.h
(686 B)
📄
hysdn_if.h
(1.29 KB)
📄
i2c-dev.h
(2.35 KB)
📄
i2c.h
(6.48 KB)
📄
i2o-dev.h
(11.22 KB)
📄
i8k.h
(1.4 KB)
📄
icmp.h
(2.82 KB)
📄
icmpv6.h
(3.74 KB)
📄
if.h
(8.47 KB)
📄
if_addr.h
(1.42 KB)
📄
if_addrlabel.h
(658 B)
📄
if_arcnet.h
(3.63 KB)
📄
if_arp.h
(5.97 KB)
📄
if_bonding.h
(3.98 KB)
📄
if_bridge.h
(3.72 KB)
📄
if_cablemodem.h
(910 B)
📄
if_ec.h
(901 B)
📄
if_eql.h
(1.25 KB)
📄
if_ether.h
(6.39 KB)
📄
if_fc.h
(1.63 KB)
📄
if_fddi.h
(3.61 KB)
📄
if_frad.h
(2.87 KB)
📄
if_hippi.h
(4.08 KB)
📄
if_infiniband.h
(1.12 KB)
📄
if_link.h
(11.79 KB)
📄
if_ltalk.h
(125 B)
📄
if_packet.h
(3.45 KB)
📄
if_phonet.h
(337 B)
📄
if_plip.h
(596 B)
📄
if_ppp.h
(6.78 KB)
📄
if_pppol2tp.h
(1.94 KB)
📄
if_pppox.h
(3.68 KB)
📄
if_slip.h
(809 B)
📄
if_strip.h
(700 B)
📄
if_tr.h
(3.12 KB)
📄
if_tun.h
(2.94 KB)
📄
if_tunnel.h
(1.42 KB)
📄
if_vlan.h
(1.67 KB)
📄
igmp.h
(2.86 KB)
📄
in.h
(8.99 KB)
📄
in6.h
(7.32 KB)
📄
in_route.h
(873 B)
📄
inet_diag.h
(2.4 KB)
📄
inotify.h
(2.77 KB)
📄
input.h
(26.95 KB)
📄
ioctl.h
(100 B)
📄
ip.h
(3.47 KB)
📄
ip6_tunnel.h
(1.05 KB)
📄
ip_vs.h
(12.29 KB)
📄
ipc.h
(1.99 KB)
📄
ipmi.h
(16.16 KB)
📄
ipmi_msgdefs.h
(4.37 KB)
📄
ipsec.h
(884 B)
📄
ipv6.h
(2.82 KB)
📄
ipv6_route.h
(1.58 KB)
📄
ipx.h
(1.78 KB)
📄
irda.h
(7.47 KB)
📄
irqnr.h
(93 B)
📁
isdn
📄
isdn.h
(5.55 KB)
📄
isdn_divertif.h
(1.01 KB)
📄
isdn_ppp.h
(1.82 KB)
📄
isdnif.h
(2.25 KB)
📄
iso_fs.h
(6.29 KB)
📄
ivtv.h
(2.66 KB)
📄
ivtvfb.h
(1.12 KB)
📄
ixjuser.h
(24.53 KB)
📄
jffs2.h
(6.79 KB)
📄
joystick.h
(3.5 KB)
📄
kd.h
(6.02 KB)
📄
kdev_t.h
(298 B)
📄
kernel.h
(2.4 KB)
📄
kernelcapi.h
(959 B)
📄
keyboard.h
(12.4 KB)
📄
keyctl.h
(2.91 KB)
📄
kvm.h
(20.2 KB)
📄
kvm_para.h
(564 B)
📄
libc-compat.h
(3.46 KB)
📄
limits.h
(874 B)
📄
llc.h
(2.77 KB)
📄
loop.h
(2.14 KB)
📄
lp.h
(3.71 KB)
📄
magic.h
(2.24 KB)
📄
major.h
(4.55 KB)
📄
map_to_7segment.h
(7.02 KB)
📄
matroxfb.h
(1.4 KB)
📄
mempolicy.h
(2 KB)
📄
meye.h
(2.48 KB)
📄
mii.h
(7.76 KB)
📄
minix_fs.h
(2.01 KB)
📄
mman.h
(230 B)
📄
mmtimer.h
(2.01 KB)
📄
mqueue.h
(2.01 KB)
📄
mroute.h
(3.72 KB)
📄
mroute6.h
(3.9 KB)
📄
msdos_fs.h
(5.7 KB)
📄
msg.h
(2.48 KB)
📄
mtio.h
(7.89 KB)
📄
n_r3964.h
(2.29 KB)
📄
nbd.h
(1.91 KB)
📄
ncp.h
(4.94 KB)
📄
ncp_fs.h
(3.28 KB)
📄
ncp_mount.h
(2.06 KB)
📄
ncp_no.h
(651 B)
📄
neighbour.h
(3.96 KB)
📄
net.h
(1.97 KB)
📄
net_dropmon.h
(1.07 KB)
📄
net_tstamp.h
(3.39 KB)
📄
netdevice.h
(1.73 KB)
📁
netfilter
📄
netfilter.h
(1.51 KB)
📁
netfilter_arp
📄
netfilter_arp.h
(380 B)
📁
netfilter_bridge
📄
netfilter_bridge.h
(735 B)
📄
netfilter_decnet.h
(1.83 KB)
📁
netfilter_ipv4
📄
netfilter_ipv4.h
(1.98 KB)
📁
netfilter_ipv6
📄
netfilter_ipv6.h
(2 KB)
📄
netlink.h
(4.85 KB)
📄
netrom.h
(719 B)
📄
nfs.h
(4.25 KB)
📄
nfs2.h
(1.37 KB)
📄
nfs3.h
(2.16 KB)
📄
nfs4.h
(5.63 KB)
📄
nfs4_mount.h
(1.83 KB)
📄
nfs_fs.h
(1.52 KB)
📄
nfs_idmap.h
(2.19 KB)
📄
nfs_mount.h
(3.13 KB)
📄
nfsacl.h
(577 B)
📁
nfsd
📄
nl80211.h
(187.85 KB)
📄
nubus.h
(8.17 KB)
📄
nvram.h
(470 B)
📄
oom.h
(456 B)
📄
param.h
(78 B)
📄
parport.h
(3.56 KB)
📄
patchkey.h
(831 B)
📄
pci.h
(1.45 KB)
📄
pci_regs.h
(37.08 KB)
📄
perf_event.h
(21.34 KB)
📄
personality.h
(1.95 KB)
📄
pfkeyv2.h
(9.91 KB)
📄
pg.h
(2.23 KB)
📄
phantom.h
(1.55 KB)
📄
phonet.h
(4.25 KB)
📄
pkt_cls.h
(9.08 KB)
📄
pkt_sched.h
(10.63 KB)
📄
pktcdvd.h
(2.56 KB)
📄
pmu.h
(5.07 KB)
📄
poll.h
(96 B)
📄
posix_types.h
(1.24 KB)
📄
ppdev.h
(3.07 KB)
📄
ppp-comp.h
(6.36 KB)
📄
ppp_defs.h
(6.31 KB)
📄
pps.h
(3.85 KB)
📄
prctl.h
(4.86 KB)
📄
ptp_clock.h
(3.41 KB)
📄
ptrace.h
(2.24 KB)
📄
qnx4_fs.h
(2.21 KB)
📄
qnxtypes.h
(561 B)
📄
quota.h
(5.59 KB)
📄
radeonfb.h
(297 B)
📁
raid
📄
random.h
(1.06 KB)
📄
raw.h
(302 B)
📄
reboot.h
(1.25 KB)
📄
reiserfs_fs.h
(907 B)
📄
reiserfs_xattr.h
(465 B)
📄
resource.h
(2.04 KB)
📄
rfkill.h
(3.3 KB)
📄
romfs_fs.h
(1.1 KB)
📄
rose.h
(2.05 KB)
📄
route.h
(2.22 KB)
📄
rtc.h
(3.61 KB)
📄
rtnetlink.h
(14.98 KB)
📄
scc.h
(4.44 KB)
📄
sched.h
(2.05 KB)
📄
screen_info.h
(2.15 KB)
📄
sdla.h
(2.77 KB)
📄
selinux_netlink.h
(1.11 KB)
📄
sem.h
(3.58 KB)
📄
serial.h
(6.62 KB)
📄
serial_core.h
(3.93 KB)
📄
serial_reg.h
(12.93 KB)
📄
serio.h
(1.65 KB)
📄
shm.h
(2.14 KB)
📄
signal.h
(129 B)
📄
signalfd.h
(1.07 KB)
📄
smb.h
(1.18 KB)
📄
smb_fs.h
(535 B)
📄
smb_mount.h
(468 B)
📄
smbno.h
(14.18 KB)
📄
snmp.h
(10.9 KB)
📄
socket.h
(738 B)
📄
sockios.h
(5.83 KB)
📄
som.h
(5.35 KB)
📄
sonet.h
(2.16 KB)
📄
sonypi.h
(5.02 KB)
📄
sound.h
(1.07 KB)
📄
soundcard.h
(44.94 KB)
📁
spi
📄
stat.h
(1005 B)
📄
stddef.h
(633 B)
📄
string.h
(175 B)
📁
sunrpc
📄
suspend_ioctls.h
(1.34 KB)
📄
swab.h
(6.14 KB)
📄
synclink.h
(8.49 KB)
📄
sysctl.h
(25.87 KB)
📄
taskstats.h
(6.78 KB)
📁
tc_act
📁
tc_ematch
📄
tcp.h
(5.08 KB)
📄
telephony.h
(8.84 KB)
📄
termios.h
(544 B)
📄
time.h
(1.7 KB)
📄
times.h
(215 B)
📄
timex.h
(6.08 KB)
📄
tiocl.h
(1.63 KB)
📄
tipc.h
(5.77 KB)
📄
tipc_config.h
(15.01 KB)
📄
toshiba.h
(1.25 KB)
📄
tty.h
(128 B)
📄
types.h
(991 B)
📄
udf_fs_i.h
(634 B)
📄
udp.h
(1.14 KB)
📄
uinput.h
(5 KB)
📄
uio.h
(648 B)
📄
ultrasound.h
(4.39 KB)
📄
un.h
(203 B)
📄
unistd.h
(157 B)
📁
usb
📄
usbdevice_fs.h
(5.21 KB)
📄
utime.h
(152 B)
📄
utsname.h
(606 B)
📄
uuid.h
(1.73 KB)
📄
version.h
(281 B)
📄
veth.h
(474 B)
📄
vhost.h
(4.46 KB)
📄
videodev.h
(10.27 KB)
📄
videodev2.h
(64.52 KB)
📄
videotext.h
(4.14 KB)
📄
virtio_9p.h
(351 B)
📄
virtio_balloon.h
(1.23 KB)
📄
virtio_blk.h
(2.91 KB)
📄
virtio_config.h
(1.25 KB)
📄
virtio_console.h
(1.37 KB)
📄
virtio_ids.h
(545 B)
📄
virtio_net.h
(6.86 KB)
📄
virtio_pci.h
(2.21 KB)
📄
virtio_ring.h
(4.38 KB)
📄
virtio_rng.h
(265 B)
📄
vt.h
(3 KB)
📄
wait.h
(580 B)
📄
wanrouter.h
(17.42 KB)
📄
watchdog.h
(2.34 KB)
📁
wimax
📄
wimax.h
(8.17 KB)
📄
wireless.h
(41.65 KB)
📄
x25.h
(3.34 KB)
📄
xattr.h
(646 B)
📄
xfrm.h
(10.31 KB)
Editing: perf_event.h
/* * Performance events: * * Copyright (C) 2008-2009, Thomas Gleixner <tglx@linutronix.de> * Copyright (C) 2008-2011, Red Hat, Inc., Ingo Molnar * Copyright (C) 2008-2011, Red Hat, Inc., Peter Zijlstra * * Data type definitions, declarations, prototypes. * * Started by: Thomas Gleixner and Ingo Molnar * * For licencing details see kernel-base/COPYING */ #ifndef _LINUX_PERF_EVENT_H #define _LINUX_PERF_EVENT_H #include <linux/types.h> #include <linux/ioctl.h> #include <asm/byteorder.h> /* * User-space ABI bits: */ /* * attr.type */ enum perf_type_id { PERF_TYPE_HARDWARE = 0, PERF_TYPE_SOFTWARE = 1, PERF_TYPE_TRACEPOINT = 2, PERF_TYPE_HW_CACHE = 3, PERF_TYPE_RAW = 4, PERF_TYPE_BREAKPOINT = 5, PERF_TYPE_MAX, /* non-ABI */ }; /* * Generalized performance event event_id types, used by the * attr.event_id parameter of the sys_perf_event_open() * syscall: */ enum perf_hw_id { /* * Common hardware events, generalized by the kernel: */ PERF_COUNT_HW_CPU_CYCLES = 0, PERF_COUNT_HW_INSTRUCTIONS = 1, PERF_COUNT_HW_CACHE_REFERENCES = 2, PERF_COUNT_HW_CACHE_MISSES = 3, PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 4, PERF_COUNT_HW_BRANCH_MISSES = 5, PERF_COUNT_HW_BUS_CYCLES = 6, PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 7, PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 8, PERF_COUNT_HW_REF_CPU_CYCLES = 9, PERF_COUNT_HW_MAX, /* non-ABI */ }; /* * Generalized hardware cache events: * * { L1-D, L1-I, LLC, ITLB, DTLB, BPU, NODE } x * { read, write, prefetch } x * { accesses, misses } */ enum perf_hw_cache_id { PERF_COUNT_HW_CACHE_L1D = 0, PERF_COUNT_HW_CACHE_L1I = 1, PERF_COUNT_HW_CACHE_LL = 2, PERF_COUNT_HW_CACHE_DTLB = 3, PERF_COUNT_HW_CACHE_ITLB = 4, PERF_COUNT_HW_CACHE_BPU = 5, PERF_COUNT_HW_CACHE_NODE = 6, PERF_COUNT_HW_CACHE_MAX, /* non-ABI */ }; enum perf_hw_cache_op_id { PERF_COUNT_HW_CACHE_OP_READ = 0, PERF_COUNT_HW_CACHE_OP_WRITE = 1, PERF_COUNT_HW_CACHE_OP_PREFETCH = 2, PERF_COUNT_HW_CACHE_OP_MAX, /* non-ABI */ }; enum perf_hw_cache_op_result_id { PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0, PERF_COUNT_HW_CACHE_RESULT_MISS = 1, PERF_COUNT_HW_CACHE_RESULT_MAX, /* non-ABI */ }; /* * Special "software" events provided by the kernel, even if the hardware * does not support performance events. These events measure various * physical and sw events of the kernel (and allow the profiling of them as * well): */ enum perf_sw_ids { PERF_COUNT_SW_CPU_CLOCK = 0, PERF_COUNT_SW_TASK_CLOCK = 1, PERF_COUNT_SW_PAGE_FAULTS = 2, PERF_COUNT_SW_CONTEXT_SWITCHES = 3, PERF_COUNT_SW_CPU_MIGRATIONS = 4, PERF_COUNT_SW_PAGE_FAULTS_MIN = 5, PERF_COUNT_SW_PAGE_FAULTS_MAJ = 6, PERF_COUNT_SW_ALIGNMENT_FAULTS = 7, PERF_COUNT_SW_EMULATION_FAULTS = 8, PERF_COUNT_SW_DUMMY = 9, PERF_COUNT_SW_MAX, /* non-ABI */ }; /* * Bits that can be set in attr.sample_type to request information * in the overflow packets. */ enum perf_event_sample_format { PERF_SAMPLE_IP = 1U << 0, PERF_SAMPLE_TID = 1U << 1, PERF_SAMPLE_TIME = 1U << 2, PERF_SAMPLE_ADDR = 1U << 3, PERF_SAMPLE_READ = 1U << 4, PERF_SAMPLE_CALLCHAIN = 1U << 5, PERF_SAMPLE_ID = 1U << 6, PERF_SAMPLE_CPU = 1U << 7, PERF_SAMPLE_PERIOD = 1U << 8, PERF_SAMPLE_STREAM_ID = 1U << 9, PERF_SAMPLE_RAW = 1U << 10, PERF_SAMPLE_BRANCH_STACK = 1U << 11, PERF_SAMPLE_REGS_USER = 1U << 12, PERF_SAMPLE_STACK_USER = 1U << 13, PERF_SAMPLE_WEIGHT = 1U << 14, PERF_SAMPLE_DATA_SRC = 1U << 15, PERF_SAMPLE_IDENTIFIER = 1U << 16, PERF_SAMPLE_TRANSACTION = 1U << 17, PERF_SAMPLE_REGS_INTR = 1U << 18, PERF_SAMPLE_MAX = 1U << 19, /* non-ABI */ }; /* * values to program into branch_sample_type when PERF_SAMPLE_BRANCH is set * * If the user does not pass priv level information via branch_sample_type, * the kernel uses the event's priv level. Branch and event priv levels do * not have to match. Branch priv level is checked for permissions. * * The branch types can be combined, however BRANCH_ANY covers all types * of branches and therefore it supersedes all the other types. */ enum perf_branch_sample_type_shift { PERF_SAMPLE_BRANCH_USER_SHIFT = 0, /* user branches */ PERF_SAMPLE_BRANCH_KERNEL_SHIFT = 1, /* kernel branches */ PERF_SAMPLE_BRANCH_HV_SHIFT = 2, /* hypervisor branches */ PERF_SAMPLE_BRANCH_ANY_SHIFT = 3, /* any branch types */ PERF_SAMPLE_BRANCH_ANY_CALL_SHIFT = 4, /* any call branch */ PERF_SAMPLE_BRANCH_ANY_RETURN_SHIFT = 5, /* any return branch */ PERF_SAMPLE_BRANCH_IND_CALL_SHIFT = 6, /* indirect calls */ PERF_SAMPLE_BRANCH_ABORT_TX_SHIFT = 7, /* transaction aborts */ PERF_SAMPLE_BRANCH_IN_TX_SHIFT = 8, /* in transaction */ PERF_SAMPLE_BRANCH_NO_TX_SHIFT = 9, /* not in transaction */ PERF_SAMPLE_BRANCH_COND_SHIFT = 10, /* conditional branches */ PERF_SAMPLE_BRANCH_CALL_STACK_SHIFT = 11, /* call/ret stack */ PERF_SAMPLE_BRANCH_MAX_SHIFT /* non-ABI */ }; enum perf_branch_sample_type { PERF_SAMPLE_BRANCH_USER = 1U << PERF_SAMPLE_BRANCH_USER_SHIFT, PERF_SAMPLE_BRANCH_KERNEL = 1U << PERF_SAMPLE_BRANCH_KERNEL_SHIFT, PERF_SAMPLE_BRANCH_HV = 1U << PERF_SAMPLE_BRANCH_HV_SHIFT, PERF_SAMPLE_BRANCH_ANY = 1U << PERF_SAMPLE_BRANCH_ANY_SHIFT, PERF_SAMPLE_BRANCH_ANY_CALL = 1U << PERF_SAMPLE_BRANCH_ANY_CALL_SHIFT, PERF_SAMPLE_BRANCH_ANY_RETURN = 1U << PERF_SAMPLE_BRANCH_ANY_RETURN_SHIFT, PERF_SAMPLE_BRANCH_IND_CALL = 1U << PERF_SAMPLE_BRANCH_IND_CALL_SHIFT, PERF_SAMPLE_BRANCH_ABORT_TX = 1U << PERF_SAMPLE_BRANCH_ABORT_TX_SHIFT, PERF_SAMPLE_BRANCH_IN_TX = 1U << PERF_SAMPLE_BRANCH_IN_TX_SHIFT, PERF_SAMPLE_BRANCH_NO_TX = 1U << PERF_SAMPLE_BRANCH_NO_TX_SHIFT, PERF_SAMPLE_BRANCH_COND = 1U << PERF_SAMPLE_BRANCH_COND_SHIFT, PERF_SAMPLE_BRANCH_CALL_STACK = 1U << PERF_SAMPLE_BRANCH_CALL_STACK_SHIFT, PERF_SAMPLE_BRANCH_MAX = 1U << PERF_SAMPLE_BRANCH_MAX_SHIFT, }; #define PERF_SAMPLE_BRANCH_PLM_ALL \ (PERF_SAMPLE_BRANCH_USER|\ PERF_SAMPLE_BRANCH_KERNEL|\ PERF_SAMPLE_BRANCH_HV) /* * Values to determine ABI of the registers dump. */ enum perf_sample_regs_abi { PERF_SAMPLE_REGS_ABI_NONE = 0, PERF_SAMPLE_REGS_ABI_32 = 1, PERF_SAMPLE_REGS_ABI_64 = 2, }; /* * Values for the memory transaction event qualifier, mostly for * abort events. Multiple bits can be set. */ enum { PERF_TXN_ELISION = (1 << 0), /* From elision */ PERF_TXN_TRANSACTION = (1 << 1), /* From transaction */ PERF_TXN_SYNC = (1 << 2), /* Instruction is related */ PERF_TXN_ASYNC = (1 << 3), /* Instruction not related */ PERF_TXN_RETRY = (1 << 4), /* Retry possible */ PERF_TXN_CONFLICT = (1 << 5), /* Conflict abort */ PERF_TXN_CAPACITY_WRITE = (1 << 6), /* Capacity write abort */ PERF_TXN_CAPACITY_READ = (1 << 7), /* Capacity read abort */ PERF_TXN_MAX = (1 << 8), /* non-ABI */ /* bits 32..63 are reserved for the abort code */ PERF_TXN_ABORT_MASK = (0xffffffffULL << 32), PERF_TXN_ABORT_SHIFT = 32, }; /* * The format of the data returned by read() on a perf event fd, * as specified by attr.read_format: * * struct read_format { * { u64 value; * { u64 time_enabled; } && PERF_FORMAT_TOTAL_TIME_ENABLED * { u64 time_running; } && PERF_FORMAT_TOTAL_TIME_RUNNING * { u64 id; } && PERF_FORMAT_ID * } && !PERF_FORMAT_GROUP * * { u64 nr; * { u64 time_enabled; } && PERF_FORMAT_TOTAL_TIME_ENABLED * { u64 time_running; } && PERF_FORMAT_TOTAL_TIME_RUNNING * { u64 value; * { u64 id; } && PERF_FORMAT_ID * } cntr[nr]; * } && PERF_FORMAT_GROUP * }; */ enum perf_event_read_format { PERF_FORMAT_TOTAL_TIME_ENABLED = 1U << 0, PERF_FORMAT_TOTAL_TIME_RUNNING = 1U << 1, PERF_FORMAT_ID = 1U << 2, PERF_FORMAT_GROUP = 1U << 3, PERF_FORMAT_MAX = 1U << 4, /* non-ABI */ }; #define PERF_ATTR_SIZE_VER0 64 /* sizeof first published struct */ #define PERF_ATTR_SIZE_VER1 72 /* add: config2 */ #define PERF_ATTR_SIZE_VER2 80 /* add: branch_sample_type */ #define PERF_ATTR_SIZE_VER3 96 /* add: sample_regs_user */ /* add: sample_stack_user */ #define PERF_ATTR_SIZE_VER4 104 /* add: sample_regs_intr */ /* * Hardware event_id to monitor via a performance monitoring event: */ struct perf_event_attr { /* * Major type: hardware/software/tracepoint/etc. */ __u32 type; /* * Size of the attr structure, for fwd/bwd compat. */ __u32 size; /* * Type specific configuration information. */ __u64 config; union { __u64 sample_period; __u64 sample_freq; }; __u64 sample_type; __u64 read_format; __u64 disabled : 1, /* off by default */ inherit : 1, /* children inherit it */ pinned : 1, /* must always be on PMU */ exclusive : 1, /* only group on PMU */ exclude_user : 1, /* don't count user */ exclude_kernel : 1, /* ditto kernel */ exclude_hv : 1, /* ditto hypervisor */ exclude_idle : 1, /* don't count when idle */ mmap : 1, /* include mmap data */ comm : 1, /* include comm data */ freq : 1, /* use freq, not period */ inherit_stat : 1, /* per task counts */ enable_on_exec : 1, /* next exec enables */ task : 1, /* trace fork/exit */ watermark : 1, /* wakeup_watermark */ /* * precise_ip: * * 0 - SAMPLE_IP can have arbitrary skid * 1 - SAMPLE_IP must have constant skid * 2 - SAMPLE_IP requested to have 0 skid * 3 - SAMPLE_IP must have 0 skid * * See also PERF_RECORD_MISC_EXACT_IP */ precise_ip : 2, /* skid constraint */ mmap_data : 1, /* non-exec mmap data */ sample_id_all : 1, /* sample_type all events */ exclude_host : 1, /* don't count in host */ exclude_guest : 1, /* don't count in guest */ exclude_callchain_kernel : 1, /* exclude kernel callchains */ exclude_callchain_user : 1, /* exclude user callchains */ mmap2 : 1, /* include mmap with inode data */ comm_exec : 1, /* flag comm events that are due to an exec */ __reserved_1 : 39; union { __u32 wakeup_events; /* wakeup every n events */ __u32 wakeup_watermark; /* bytes before wakeup */ }; __u32 bp_type; union { __u64 bp_addr; __u64 config1; /* extension of config */ }; union { __u64 bp_len; __u64 config2; /* extension of config1 */ }; __u64 branch_sample_type; /* enum perf_branch_sample_type */ /* * Defines set of user regs to dump on samples. * See asm/perf_regs.h for details. */ __u64 sample_regs_user; /* * Defines size of the user stack to dump on samples. */ __u32 sample_stack_user; /* Align to u64. */ __u32 __reserved_2; /* * Defines set of regs to dump for each sample * state captured on: * - precise = 0: PMU interrupt * - precise > 0: sampled instruction * * See asm/perf_regs.h for details. */ __u64 sample_regs_intr; }; /* * Ioctls that can be done on a perf event fd: */ #define PERF_EVENT_IOC_ENABLE _IO ('$', 0) #define PERF_EVENT_IOC_DISABLE _IO ('$', 1) #define PERF_EVENT_IOC_REFRESH _IO ('$', 2) #define PERF_EVENT_IOC_RESET _IO ('$', 3) #define PERF_EVENT_IOC_PERIOD _IOW('$', 4, __u64) #define PERF_EVENT_IOC_SET_OUTPUT _IO ('$', 5) #define PERF_EVENT_IOC_SET_FILTER _IOW('$', 6, char *) #define PERF_EVENT_IOC_ID _IOR('$', 7, __u64 *) enum perf_event_ioc_flags { PERF_IOC_FLAG_GROUP = 1U << 0, }; /* * Structure of the page that can be mapped via mmap */ struct perf_event_mmap_page { __u32 version; /* version number of this structure */ __u32 compat_version; /* lowest version this is compat with */ /* * Bits needed to read the hw events in user-space. * * u32 seq; * s64 count; * * do { * seq = pc->lock; * * barrier() * if (pc->index) { * count = pmc_read(pc->index - 1); * count += pc->offset; * } else * goto regular_read; * * barrier(); * } while (pc->lock != seq); * * NOTE: for obvious reason this only works on self-monitoring * processes. */ __u32 lock; /* seqlock for synchronization */ __u32 index; /* hardware event identifier */ __s64 offset; /* add to hardware event value */ __u64 time_enabled; /* time event active */ __u64 time_running; /* time event on cpu */ /* * Hole for extension of the self monitor capabilities */ __u64 __reserved[123]; /* align to 1k */ /* * Control data for the mmap() data buffer. * * User-space reading the @data_head value should issue an smp_rmb(), * after reading this value. * * When the mapping is PROT_WRITE the @data_tail value should be * written by userspace to reflect the last read data, after issueing * an smp_mb() to separate the data read from the ->data_tail store. * In this case the kernel will not over-write unread data. * * See perf_output_put_handle() for the data ordering. */ __u64 data_head; /* head in the data section */ __u64 data_tail; /* user-space written tail */ }; #define PERF_RECORD_MISC_CPUMODE_MASK (7 << 0) #define PERF_RECORD_MISC_CPUMODE_UNKNOWN (0 << 0) #define PERF_RECORD_MISC_KERNEL (1 << 0) #define PERF_RECORD_MISC_USER (2 << 0) #define PERF_RECORD_MISC_HYPERVISOR (3 << 0) #define PERF_RECORD_MISC_GUEST_KERNEL (4 << 0) #define PERF_RECORD_MISC_GUEST_USER (5 << 0) /* * PERF_RECORD_MISC_MMAP_DATA and PERF_RECORD_MISC_COMM_EXEC are used on * different events so can reuse the same bit position. */ #define PERF_RECORD_MISC_MMAP_DATA (1 << 13) #define PERF_RECORD_MISC_COMM_EXEC (1 << 13) /* * Indicates that the content of PERF_SAMPLE_IP points to * the actual instruction that triggered the event. See also * perf_event_attr::precise_ip. */ #define PERF_RECORD_MISC_EXACT_IP (1 << 14) /* * Reserve the last bit to indicate some extended misc field */ #define PERF_RECORD_MISC_EXT_RESERVED (1 << 15) struct perf_event_header { __u32 type; __u16 misc; __u16 size; }; enum perf_event_type { /* * If perf_event_attr.sample_id_all is set then all event types will * have the sample_type selected fields related to where/when * (identity) an event took place (TID, TIME, ID, STREAM_ID, CPU, * IDENTIFIER) described in PERF_RECORD_SAMPLE below, it will be stashed * just after the perf_event_header and the fields already present for * the existing fields, i.e. at the end of the payload. That way a newer * perf.data file will be supported by older perf tools, with these new * optional fields being ignored. * * struct sample_id { * { u32 pid, tid; } && PERF_SAMPLE_TID * { u64 time; } && PERF_SAMPLE_TIME * { u64 id; } && PERF_SAMPLE_ID * { u64 stream_id;} && PERF_SAMPLE_STREAM_ID * { u32 cpu, res; } && PERF_SAMPLE_CPU * { u64 id; } && PERF_SAMPLE_IDENTIFIER * } && perf_event_attr::sample_id_all * * Note that PERF_SAMPLE_IDENTIFIER duplicates PERF_SAMPLE_ID. The * advantage of PERF_SAMPLE_IDENTIFIER is that its position is fixed * relative to header.size. */ /* * The MMAP events record the PROT_EXEC mappings so that we can * correlate userspace IPs to code. They have the following structure: * * struct { * struct perf_event_header header; * * u32 pid, tid; * u64 addr; * u64 len; * u64 pgoff; * char filename[]; * }; */ PERF_RECORD_MMAP = 1, /* * struct { * struct perf_event_header header; * u64 id; * u64 lost; * struct sample_id sample_id; * }; */ PERF_RECORD_LOST = 2, /* * struct { * struct perf_event_header header; * * u32 pid, tid; * char comm[]; * struct sample_id sample_id; * }; */ PERF_RECORD_COMM = 3, /* * struct { * struct perf_event_header header; * u32 pid, ppid; * u32 tid, ptid; * u64 time; * struct sample_id sample_id; * }; */ PERF_RECORD_EXIT = 4, /* * struct { * struct perf_event_header header; * u64 time; * u64 id; * u64 stream_id; * struct sample_id sample_id; * }; */ PERF_RECORD_THROTTLE = 5, PERF_RECORD_UNTHROTTLE = 6, /* * struct { * struct perf_event_header header; * u32 pid, ppid; * u32 tid, ptid; * u64 time; * struct sample_id sample_id; * }; */ PERF_RECORD_FORK = 7, /* * struct { * struct perf_event_header header; * u32 pid, tid; * * struct read_format values; * struct sample_id sample_id; * }; */ PERF_RECORD_READ = 8, /* * struct { * struct perf_event_header header; * * # * # Note that PERF_SAMPLE_IDENTIFIER duplicates PERF_SAMPLE_ID. * # The advantage of PERF_SAMPLE_IDENTIFIER is that its position * # is fixed relative to header. * # * * { u64 id; } && PERF_SAMPLE_IDENTIFIER * { u64 ip; } && PERF_SAMPLE_IP * { u32 pid, tid; } && PERF_SAMPLE_TID * { u64 time; } && PERF_SAMPLE_TIME * { u64 addr; } && PERF_SAMPLE_ADDR * { u64 id; } && PERF_SAMPLE_ID * { u64 stream_id;} && PERF_SAMPLE_STREAM_ID * { u32 cpu, res; } && PERF_SAMPLE_CPU * { u64 period; } && PERF_SAMPLE_PERIOD * * { struct read_format values; } && PERF_SAMPLE_READ * * { u64 nr, * u64 ips[nr]; } && PERF_SAMPLE_CALLCHAIN * * # * # The RAW record below is opaque data wrt the ABI * # * # That is, the ABI doesn't make any promises wrt to * # the stability of its content, it may vary depending * # on event, hardware, kernel version and phase of * # the moon. * # * # In other words, PERF_SAMPLE_RAW contents are not an ABI. * # * * { u32 size; * char data[size];}&& PERF_SAMPLE_RAW * * { u64 from, to, flags } lbr[nr];} && PERF_SAMPLE_BRANCH_STACK * * { u64 abi; # enum perf_sample_regs_abi * u64 regs[weight(mask)]; } && PERF_SAMPLE_REGS_USER * * { u64 size; * char data[size]; * u64 dyn_size; } && PERF_SAMPLE_STACK_USER * * { u64 weight; } && PERF_SAMPLE_WEIGHT * { u64 data_src; } && PERF_SAMPLE_DATA_SRC * { u64 transaction; } && PERF_SAMPLE_TRANSACTION * { u64 abi; # enum perf_sample_regs_abi * u64 regs[weight(mask)]; } && PERF_SAMPLE_REGS_INTR * }; */ PERF_RECORD_SAMPLE = 9, /* * The MMAP2 records are an augmented version of MMAP, they add * maj, min, ino numbers to be used to uniquely identify each mapping * * struct { * struct perf_event_header header; * * u32 pid, tid; * u64 addr; * u64 len; * u64 pgoff; * u32 maj; * u32 min; * u64 ino; * u64 ino_generation; * u32 prot, flags; * char filename[]; * struct sample_id sample_id; * }; */ PERF_RECORD_MMAP2 = 10, PERF_RECORD_MAX, /* non-ABI */ }; #define PERF_MAX_STACK_DEPTH 255 enum perf_callchain_context { PERF_CONTEXT_HV = (__u64)-32, PERF_CONTEXT_KERNEL = (__u64)-128, PERF_CONTEXT_USER = (__u64)-512, PERF_CONTEXT_GUEST = (__u64)-2048, PERF_CONTEXT_GUEST_KERNEL = (__u64)-2176, PERF_CONTEXT_GUEST_USER = (__u64)-2560, PERF_CONTEXT_MAX = (__u64)-4095, }; #define PERF_FLAG_FD_NO_GROUP (1U << 0) #define PERF_FLAG_FD_OUTPUT (1U << 1) #define PERF_FLAG_PID_CGROUP (1U << 2) /* pid=cgroup id, per-cpu mode only */ #define PERF_FLAG_FD_CLOEXEC (1U << 3) /* O_CLOEXEC */ union perf_mem_data_src { __u64 val; struct { __u64 mem_op:5, /* type of opcode */ mem_lvl:14, /* memory hierarchy level */ mem_snoop:5, /* snoop mode */ mem_lock:2, /* lock instr */ mem_dtlb:7, /* tlb access */ mem_rsvd:31; }; }; /* type of opcode (load/store/prefetch,code) */ #define PERF_MEM_OP_NA 0x01 /* not available */ #define PERF_MEM_OP_LOAD 0x02 /* load instruction */ #define PERF_MEM_OP_STORE 0x04 /* store instruction */ #define PERF_MEM_OP_PFETCH 0x08 /* prefetch */ #define PERF_MEM_OP_EXEC 0x10 /* code (execution) */ #define PERF_MEM_OP_SHIFT 0 /* memory hierarchy (memory level, hit or miss) */ #define PERF_MEM_LVL_NA 0x01 /* not available */ #define PERF_MEM_LVL_HIT 0x02 /* hit level */ #define PERF_MEM_LVL_MISS 0x04 /* miss level */ #define PERF_MEM_LVL_L1 0x08 /* L1 */ #define PERF_MEM_LVL_LFB 0x10 /* Line Fill Buffer */ #define PERF_MEM_LVL_L2 0x20 /* L2 */ #define PERF_MEM_LVL_L3 0x40 /* L3 */ #define PERF_MEM_LVL_LOC_RAM 0x80 /* Local DRAM */ #define PERF_MEM_LVL_REM_RAM1 0x100 /* Remote DRAM (1 hop) */ #define PERF_MEM_LVL_REM_RAM2 0x200 /* Remote DRAM (2 hops) */ #define PERF_MEM_LVL_REM_CCE1 0x400 /* Remote Cache (1 hop) */ #define PERF_MEM_LVL_REM_CCE2 0x800 /* Remote Cache (2 hops) */ #define PERF_MEM_LVL_IO 0x1000 /* I/O memory */ #define PERF_MEM_LVL_UNC 0x2000 /* Uncached memory */ #define PERF_MEM_LVL_SHIFT 5 /* snoop mode */ #define PERF_MEM_SNOOP_NA 0x01 /* not available */ #define PERF_MEM_SNOOP_NONE 0x02 /* no snoop */ #define PERF_MEM_SNOOP_HIT 0x04 /* snoop hit */ #define PERF_MEM_SNOOP_MISS 0x08 /* snoop miss */ #define PERF_MEM_SNOOP_HITM 0x10 /* snoop hit modified */ #define PERF_MEM_SNOOP_SHIFT 19 /* locked instruction */ #define PERF_MEM_LOCK_NA 0x01 /* not available */ #define PERF_MEM_LOCK_LOCKED 0x02 /* locked transaction */ #define PERF_MEM_LOCK_SHIFT 24 /* TLB access */ #define PERF_MEM_TLB_NA 0x01 /* not available */ #define PERF_MEM_TLB_HIT 0x02 /* hit level */ #define PERF_MEM_TLB_MISS 0x04 /* miss level */ #define PERF_MEM_TLB_L1 0x08 /* L1 */ #define PERF_MEM_TLB_L2 0x10 /* L2 */ #define PERF_MEM_TLB_WK 0x20 /* Hardware Walker*/ #define PERF_MEM_TLB_OS 0x40 /* OS fault handler */ #define PERF_MEM_TLB_SHIFT 26 #define PERF_MEM_S(a, s) \ (((__u64)PERF_MEM_##a##_##s) << PERF_MEM_##a##_SHIFT) #endif /* _LINUX_PERF_EVENT_H */
Upload File
Create Folder