Commit ae142e0c authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Benjamin Herrenschmidt
Browse files

powerpc/sputrace: Use the generic event tracer



I wrote sputrace before generic tracing infrastrucure was available.
Now that we have the generic event tracer we can convert it over and
remove a lot of code:

  8 files changed, 45 insertions(+), 285 deletions(-)

To use it make sure CONFIG_EVENT_TRACING is enabled and then enable
the spufs trace channel by

  echo 1 > /sys/kernel/debug/tracing/events/spufs/spufs_context/enable

and then read the trace records using e.g.

  cat /sys/kernel/debug/tracing/trace

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Acked-by: default avatarJeremy Kerr <jk@ozlabs.org>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 797a747a
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -80,13 +80,6 @@ config SPU_FS_64K_LS
	  uses 4K pages. This can improve performances of applications
	  using multiple SPEs by lowering the TLB pressure on them.

config SPU_TRACE
	tristate "SPU event tracing support"
	depends on SPU_FS && MARKERS
	help
	  This option allows reading a trace of spu-related events through
	  the sputrace file in procfs.

config SPU_BASE
	bool
	default n
+2 −1
Original line number Diff line number Diff line
@@ -4,7 +4,8 @@ spufs-y += inode.o file.o context.o syscalls.o coredump.o
spufs-y += sched.o backing_ops.o hw_ops.o run.o gang.o
spufs-y += switch.o fault.o lscsa_alloc.o

obj-$(CONFIG_SPU_TRACE)	+= sputrace.o
# magic for the trace events
CFLAGS_sched.o := -I$(src)

# Rules to build switch.o with the help of SPU tool chain
SPU_CROSS	:= spu-
+1 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@
#include <asm/spu.h>
#include <asm/spu_csa.h>
#include "spufs.h"
#include "sputrace.h"


atomic_t nr_spu_contexts = ATOMIC_INIT(0);
+1 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@
#include <asm/uaccess.h>

#include "spufs.h"
#include "sputrace.h"

#define SPUFS_MMAP_4K (PAGE_SIZE == 0x1000)

+2 −0
Original line number Diff line number Diff line
@@ -47,6 +47,8 @@
#include <asm/spu_csa.h>
#include <asm/spu_priv1.h>
#include "spufs.h"
#define CREATE_TRACE_POINTS
#include "sputrace.h"

struct spu_prio_array {
	DECLARE_BITMAP(bitmap, MAX_PRIO);
Loading