linux/tools/perf
Mark Rutland 6aa7de0591 locking/atomics: COCCINELLE/treewide: Convert trivial ACCESS_ONCE() patterns to READ_ONCE()/WRITE_ONCE()
Please do not apply this to mainline directly, instead please re-run the
coccinelle script shown below and apply its output.

For several reasons, it is desirable to use {READ,WRITE}_ONCE() in
preference to ACCESS_ONCE(), and new code is expected to use one of the
former. So far, there's been no reason to change most existing uses of
ACCESS_ONCE(), as these aren't harmful, and changing them results in
churn.

However, for some features, the read/write distinction is critical to
correct operation. To distinguish these cases, separate read/write
accessors must be used. This patch migrates (most) remaining
ACCESS_ONCE() instances to {READ,WRITE}_ONCE(), using the following
coccinelle script:

----
// Convert trivial ACCESS_ONCE() uses to equivalent READ_ONCE() and
// WRITE_ONCE()

// $ make coccicheck COCCI=/home/mark/once.cocci SPFLAGS="--include-headers" MODE=patch

virtual patch

@ depends on patch @
expression E1, E2;
@@

- ACCESS_ONCE(E1) = E2
+ WRITE_ONCE(E1, E2)

@ depends on patch @
expression E;
@@

- ACCESS_ONCE(E)
+ READ_ONCE(E)
----

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: davem@davemloft.net
Cc: linux-arch@vger.kernel.org
Cc: mpe@ellerman.id.au
Cc: shuah@kernel.org
Cc: snitzer@redhat.com
Cc: thor.thayer@linux.intel.com
Cc: tj@kernel.org
Cc: viro@zeniv.linux.org.uk
Cc: will.deacon@arm.com
Link: http://lkml.kernel.org/r/1508792849-3115-19-git-send-email-paulmck@linux.vnet.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-10-25 11:01:08 +02:00
..
Documentation perf record: Fix documentation for a inexistent option '-l' 2017-10-17 09:05:36 -03:00
arch perf test: Fix vmlinux failure on s390x part 2 2017-09-28 13:01:42 -03:00
bench
jvmti
pmu-events perf vendor events powerpc: Remove duplicate events 2017-09-01 14:46:00 -03:00
python
scripts perf script python: Add support for sqlite3 to call-graph-from-sql.py 2017-08-15 17:03:38 -03:00
tests perf test shell trace+probe_libc_inet_pton.sh: Be compatible with Debian/Ubuntu 2017-10-18 09:14:18 -03:00
trace perf trace beauty: Beautify pkey_{alloc,free,mprotect} arguments 2017-08-28 16:44:47 -03:00
ui perf hists: Add extra integrity checks to fmt_free() 2017-10-13 16:43:42 -03:00
util locking/atomics: COCCINELLE/treewide: Convert trivial ACCESS_ONCE() patterns to READ_ONCE()/WRITE_ONCE() 2017-10-25 11:01:08 +02:00
.gitignore
Build perf trace: Only build tools/perf/trace/beauty/ when building 'perf trace' 2017-07-18 23:13:52 -03:00
CREDITS
MANIFEST perf tools: Get all of tools/{arch,include}/ in the MANIFEST 2017-09-25 10:39:43 -03:00
Makefile
Makefile.config perf tools: Robustify detection of clang binary 2017-08-28 16:44:46 -03:00
Makefile.perf perf trace beauty: Beautify pkey_{alloc,free,mprotect} arguments 2017-08-28 16:44:47 -03:00
builtin-annotate.c perf annotate browser: Support --show-nr-samples option 2017-08-18 11:15:09 -03:00
builtin-bench.c
builtin-buildid-cache.c perf buildid-cache: Cache debuginfo 2017-07-18 23:14:11 -03:00
builtin-buildid-list.c
builtin-c2c.c
builtin-config.c perf config: Check not only section->from_system_config but also item's 2017-09-12 12:35:11 -03:00
builtin-data.c perf data: Add doc when no conversion support compiled 2017-07-28 16:30:45 -03:00
builtin-diff.c
builtin-evlist.c
builtin-ftrace.c tools include: Adopt strstarts() from the kernel 2017-07-20 15:46:10 -03:00
builtin-help.c tools include: Adopt strstarts() from the kernel 2017-07-20 15:46:10 -03:00
builtin-inject.c perf tools: Add feature header record to pipe-mode 2017-07-18 23:14:36 -03:00
builtin-kallsyms.c
builtin-kmem.c mm: treewide: remove GFP_TEMPORARY allocation flag 2017-09-13 18:53:16 -07:00
builtin-kvm.c
builtin-list.c
builtin-lock.c
builtin-mem.c perf mem: Support physical address 2017-09-01 14:46:23 -03:00
builtin-probe.c perf buildid-cache: Support binary objects from other namespaces 2017-07-18 23:14:11 -03:00
builtin-record.c perf tools: Support new sample type for physical address 2017-09-01 14:46:00 -03:00
builtin-report.c perf report: Group stat values on global event id 2017-08-28 16:44:44 -03:00
builtin-sched.c
builtin-script.c perf script: Add missing separator for "-F ip,brstack" (and brstackoff) 2017-10-06 09:48:32 -03:00
builtin-stat.c perf stat: Wait for the correct child 2017-09-12 12:49:13 -03:00
builtin-timechart.c
builtin-top.c perf top: Support lookup of symbols in other mount namespaces. 2017-07-25 22:43:16 -03:00
builtin-trace.c perf trace: Support syscall name globbing 2017-09-01 14:45:58 -03:00
builtin-version.c
builtin.h
check-headers.sh tools include uapi: Grab a copy of linux/vhost.h 2017-08-01 13:04:56 -03:00
command-list.txt
design.txt
perf-archive.sh
perf-completion.sh
perf-read-vdso.c
perf-sys.h perf tools: Use default CPUINFO_PROC where it fits 2017-08-17 16:58:21 -03:00
perf-with-kcore.sh
perf.c perf tools: Support running perf binaries with a dash in their name 2017-09-12 12:48:54 -03:00
perf.h perf tools: Support new sample type for physical address 2017-09-01 14:46:00 -03:00