Ray Strode f313ca4dae lib: Add full barrier before writing data_tail
The kernel says here http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/kernel/events/ring_buffer.c?id=7a1dcf6ad#n61 :

	 * Since the mmap() consumer (userspace) can run on a different CPU:
	 *
	 *   kernel				user
	 *
	 *   if (LOAD ->data_tail) {		LOAD ->data_head
	 *			(A)		smp_rmb()	(C)
	 *	STORE $data			LOAD $data
	 *	smp_wmb()	(B)		smp_mb()	(D)
	 *	STORE ->data_head		STORE ->data_tail
	 *   }
	 *
	 * Where A pairs with D, and B pairs with C.
	 *
	 * In our case (A) is a control dependency that separates the load of
	 * the ->data_tail and the stores of $data. In case ->data_tail
	 * indicates there is no room in the buffer to store $data we do not.
	 *
	 * D needs to be a full barrier since it separates the data READ
	 * from the tail WRITE.
	 *
	 * For B a WMB is sufficient since it separates two WRITEs, and for C
	 * an RMB is sufficient since it separates two READs.
	 *
	 * See perf_output_begin().

So I'm pretty sure we need a full barrier before writing out data_tail.
2016-08-23 16:53:39 -04:00
2016-04-13 05:38:37 -07:00
2016-06-18 11:52:26 -07:00
2016-04-13 05:24:03 -07:00
2016-08-21 20:32:24 +02:00
2016-04-13 05:33:16 -07:00
2016-04-15 19:22:30 -07:00
2016-04-13 05:24:03 -07:00
2016-08-22 21:52:53 -07:00
2016-04-13 05:14:09 -07:00
2016-04-13 05:24:03 -07:00
2016-04-22 18:34:48 -07:00
2016-04-13 05:24:03 -07:00
2016-04-13 05:24:03 -07:00
2016-08-22 21:52:53 -07:00
2016-06-19 14:05:37 -07:00
2016-04-13 05:38:37 -07:00
2016-04-14 02:52:06 -07:00

Sysprof is a sampling profiler that uses a kernel module to generate
stacktraces which are then interpreted by the userspace program
"sysprof".

See the Sysprof homepage:

        http://sysprof.com/

for more information

Questions, patches and bug reports should be sent to the sysprof
mailing list:

        sysprof-list@gnome.org

The list is archived here:

        https://mail.gnome.org/archives/sysprof-list/

Debugging symbols

- The programs and libraries you want to profile should be compiled
  with -fno-omit-frame-pointer and have debugging symbols available,
  or you won't get much usable information.
Description
Languages
C 98.9%
Meson 1%