Commit Graph

100 Commits

Author SHA1 Message Date
Vince Weaver bc9d90b589 perf_event_open.2: Clarify PERF_SAMPLE_DATA_SRC usage
When checking the fields in the PERF_SAMPLE_DATA_SRC type samples
you need to shift the masks before doing the compare.

Although the value you are checking (perf_mem_data_src) is
specified as a bitfield so this might all fall apart if trying
to access the field in a cross-endian way.  The Power people
were working on this issue, not sure if they resolved it.

Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-07-20 09:22:47 +02:00
Vince Weaver 02ca78a0c7 perf_event_open.2: Clarify PERF_SAMPLE_STACK_USER usage
This clarifies the PERF_SAMPLE_STACK_USER section.
I found these issue while implementing some code that uses
the option.  The important change is fixing the name of the
sample_stack_user parameter, the rest is just some wording
fixes and minor clarifications.

Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-07-20 09:22:47 +02:00
Michael Kerrisk cb8a928f3a perf_event_open.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-05-19 09:37:03 +02:00
Michael Kerrisk 3d1ee4971b delete_module.2, perf_event_open.2, sched_setscheduler.2, shmctl.2, gai.conf.5, resolv.conf.5, fanotify.7, man-pages.7: wsfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-05-12 08:44:56 +02:00
Michael Kerrisk 2b9b829d52 time.1, get_kernel_syms.2, getitimer.2, open.2, perf_event_open.2, wait.2, alloca.3, bcmp.3, catopen.3, fputwc.3, iconv.3, iswalnum.3, iswalpha.3, iswblank.3, iswcntrl.3, iswctype.3, iswdigit.3, iswgraph.3, iswlower.3, iswprint.3, iswpunct.3, iswspace.3, iswupper.3, iswxdigit.3, mbsinit.3, putwchar.3, rcmd.3, rexec.3, sigqueue.3, strverscmp.3, wctrans.3, wctype.3, wcwidth.3, console_codes.4, initrd.4, st.4, elf.5, nss.5, ip.7, netdevice.7, path_resolution.7, socket.7, udp.7, ld.so.8: grfix: s/Otherwise /Otherwise, /
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-28 10:15:47 +02:00
Michael Kerrisk 2b23ecbdea perf_event_open.2: Explain the EACCES "monitoring all processes" case more precisely
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-17 09:44:58 +02:00
Michael Kerrisk bec6277efa perf_event_open.2: Change "fd" to "file descriptor"
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-17 09:22:06 +02:00
Michael Kerrisk ee7b0cbfc9 perf_event_open.2: Change "current process" to "calling process" in various places
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-17 09:22:06 +02:00
Michael Kerrisk ce88f77b91 perf_event_open.2: Minor grammar, formatting, wording, and typo fixes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-17 09:22:06 +02:00
Vince Weaver 27f0af8e92 perf_event_open.2: clarify EACCES and EPERM errors
Clarify the reasons for EACCES and EPERM errors.

Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-16 07:50:48 +02:00
Michael Kerrisk 079928f31c perf_event_open.2: Minor wording fixes for EACCES error
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-14 12:38:34 +02:00
Michael Kerrisk a61dba3485 perf_event_open.2: Minor clarification to close-on-exec text
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-10 21:54:25 +02:00
Michael Kerrisk accec05152 perf_event_open.2: Minor clean-ups after Vince Weaver's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-10 21:50:15 +02:00
Vince Weaver d8b7d950dd perf_event_open.2 -- expand ERRORS section
Expand the perf_event_open.2 ERRORS section to be more comprehensive.

These were determined both by code inspection and by writing a large
number of test programs.

Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-10 21:24:25 +02:00
Michael Kerrisk b8dbf73de8 bdflush.2, fsync.2, mmap.2, open.2, perf_event_open.2, sync.2, syscall.2, fmemopen.3, getaddrinfo.3, getline.3, mq_notify.3, offsetof.3, aio.7, symlink.7: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-06 08:47:35 +02:00
Michael Kerrisk 8bad22e53b perf_event_open.2: grfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-02 09:41:11 +02:00
Michael Kerrisk e9b1ab7892 perf_event_open.2: Minor fix: place PERF_FLAG_FD_CLOEXEC in alphabetical order
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-02 09:37:26 +02:00
Michael Kerrisk 4f4f57abc2 perf_event_open.2: Rework Vince Weaver's discussion of PERF_FLAG_FD_CLOEXEC
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-02 09:37:26 +02:00
Vince Weaver 9cb36a115d perf_event_open.2: Document the PERF_FLAG_FD_CLOEXEC flag
The Linux 3.14 release adds support for the PERF_FLAG_FD_CLOEXEC
flag.

The wording is based on the description in kernel commit
a21b0b354d4ac39be691f51c53562e2c24443d9e
by Yann Droneaud.

Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-02 09:27:54 +02:00
Michael Kerrisk ed81fdd98d perf_event_open.2: grfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-01 21:40:15 +02:00
Vince Weaver 3f118a2944 perf_event_open.2: Document PERF_EVENT_IOC_PERIOD behavior change
Linux 3.14 (in commit bad7192b842c83e580747ca57104dd51fe08c223)
changes the perf_event PERF_EVENT_IOC_PERIOD ioctl() behavior
on all architectures to update immediately, to match the behavior
found on ARM.

Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-01 21:01:42 +02:00
Michael Kerrisk 31020de90c perf_event_open.2: grfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-03-26 07:33:17 +01:00
Michael Kerrisk 37bee118ad perf_event_open.2: wfix + grfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-03-26 07:33:16 +01:00
Michael Kerrisk ffd4dec0f7 perf_event_open.2, endian.3: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-02-10 11:03:45 +01:00
Michael Kerrisk 5ebe61d65c perf_event_open.2: srcfix: remove redundant .RE
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-02-10 10:12:29 +01:00
Michael Kerrisk fecd584f0c perf_event_open.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-02-10 09:52:05 +01:00
Michael Kerrisk 0fe9e4b13a perf_event_open.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-02-10 08:40:15 +01:00
David Prévot 053a3e08ad perf_event_open.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-02-04 10:02:32 +01:00
Michael Kerrisk edcf162e3f perf_event_open.2, printf.3: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-29 13:51:21 +01:00
Michael Kerrisk 84fc2a6e35 Removed trailing white space at end of lines 2014-01-24 12:06:21 +01:00
Michael Kerrisk 31c1f2b09e getrlimit.2, madvise.2, mount.2, open.2, perf_event_open.2, send.2: tfix: Consistent capitalization for "(since Linux...)"
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-24 11:44:56 +01:00
Michael Kerrisk 7de4a1e357 perf_event_open.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-23 15:36:04 +01:00
Michael Kerrisk b3f39642ec perf_event_open.2: Minor fixes to Vince Weaver's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-23 15:36:04 +01:00
Vince Weaver 1e04395903 perf_event_open.2 : PERF_SAMPLE_TRANSACTION support in Linux 3.13 (fwd)
The following patch adds descriptions of the new perf_event_open.2
PERF_SAMPLE_TRANSACTION sample type as added in Linux 3.13.

The descriptions are based on information provided by Andi Kleen,
both in the e-mail

    [PATCH 1/6] perf, core: Add generic transaction flags v5

sent to the linux-kernel list as well as an e-mail

    [PATCH] Document transaction flags in perf_event_open manpage

sent to the linux-man list.

The implementation is based heavily on the Intel Haswell
processor.  Documentation can be found at this page:
http://software.intel.com/en-us/blogs/2013/05/03/intelr-transactional-synchronization-extensions-intelr-tsx-profiling-with-linux-0
as well as in section 18.11.5.1 of volume 3 of the
Intel 64 and IA-32 Architecture Software Developer's Manual.

Also, someone with better manpage formatting skills than I have
should probably investigate why I can't get the last line of
the change to properly tab-align with the .I transaction
heading.

Cowritten-by: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-23 15:36:04 +01:00
Michael Kerrisk f78ed33a65 madvise.2, perf_event_open.2, query_module.2, stat.2, sem_init.3, hpsa.4, rtc.4, st.4, elf.5, filesystems.5, proc.5, environ.7, man-pages.7, regex.7, units.7: Reword to avoid use of "etc."
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-18 23:58:39 +13:00
Michael Kerrisk d35326474f Removed trailing white space at end of lines 2014-01-11 08:04:54 +13:00
Michael Kerrisk 76c637e18c getcpu.2, getunwind.2, kcmp.2, mmap.2, perf_event_open.2, perfmonctl.2, quotactl.2, restart_syscall.2, btree.3, dbopen.3, hash.3, recno.3, sched_getcpu.3, elf.5, bootparam.7, hier.7, netdevice.7, rtnetlink.7: wfix: "xxxx specific" ==> "xxxx-specific" 2014-01-11 06:16:28 +13:00
Michael Kerrisk 571767ca38 perf_event_open.2: Add "static" qualifier to function in example program
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-05 13:12:32 +13:00
Michael Kerrisk 7d182bb660 perf_event_open.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-03 15:47:05 +13:00
Michael Kerrisk 4651e41294 perf_event_open.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-03 10:19:25 +13:00
David Prévot cd7c700a16 perf_event_open.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:14 +13:00
Michael Kerrisk 7607f23546 perf_event_open.2: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:14 +13:00
Vince Weaver 406650db6b perf_event_open.2: Clarify issues with the disabled bit
Clarify the perf_event_open behavior with respect to the disabled
bit and creating event groups.

Reported-by: Sudhanshu Goswami <Sudhanshu.Goswami@emc.com>
Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:08 +13:00
Vince Weaver bea10c8c40 perf_event_open.2. Clarify issues with the exclusive bit
Warn that using the perf_event_open "exclusive" bit, while it might seem
like a good idea, might lead to all 0 results in some common usage cases.

Reported-by: Sudhanshu Goswami <Sudhanshu.Goswami@emc.com>
Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-12-27 07:31:46 +13:00
Michael Kerrisk b8efc3ed61 Removed trailing white space at end of lines 2013-12-12 20:42:43 +13:00
Michael Kerrisk f2d15dc910 perf_event_open.2: ffix + tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-12-12 16:45:03 +13:00
Vince Weaver 75ee11e514 perf_event_open.2: Update description for mmap_data bit
Here's an updated version of [David Ahern's] patch that
expands the "mmap" definition as well as that of "mmap_data".
Also some manpage related formatting improvements from the
original patch.

Link: https://lkml.org/lkml/2013/11/11/505

Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>
Acked-by: David Ahern <dsahern@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-12-12 16:42:03 +13:00
Vince Weaver a02a1737af perf_event_open.2: cpu/pid argument cleanup
This patch attempts to clarify the pid and cpu options to
perf_event_open().

It does two things:
  1.  Tries to make clear that the "pid" argument can mean
      process *or* thread.  This is made confusing by
      how Linux uses the terms mostly interchangeably.
  2.  The cpu/pid documentation was confusing because of
      how the parameters are interdependent.  Since there
      are only 6 possible combinations I broke out the
      possibilities into a table.

Reported-by: Manuel Selva <selva.manuel@gmail.com>
Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-12-12 16:41:47 +13:00
David Prévot 7205b8dfd8 perf_event_open.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-12-12 16:16:08 +13:00
David Prévot 8859d3a9e2 perf_event_open.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-12-12 16:16:08 +13:00