diff options
| author | John Ogness <john.ogness@linutronix.de> | 2017-12-19 10:59:40 +0100 |
|---|---|---|
| committer | John Ogness <john.ogness@linutronix.de> | 2017-12-19 10:59:40 +0100 |
| commit | 270520b4a2eac8725c8575c3180964289722e191 (patch) | |
| tree | d9512cd96d0c52e14293c3f8bc19fd168ee14025 /schulung_tools/ipc_shm/README | |
| parent | 27209bb802048f4803d9cd9a5c2f99d613986446 (diff) | |
schulung_tools: add various demos and tools
Different tools have been used by various trainers as demos. Put
all these into master so they are available to all trainers.
ipc_pipe: ipc demo using pipes
ipc_shm: ipc demo using shared memory
libduma: source and instructions for compiling libduma
matrix: demo of good and bad cache access
mtrace: patch and infos for using mtrace with ASLR
rtex: demo of handling page faults
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Diffstat (limited to 'schulung_tools/ipc_shm/README')
| -rw-r--r-- | schulung_tools/ipc_shm/README | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/schulung_tools/ipc_shm/README b/schulung_tools/ipc_shm/README new file mode 100644 index 0000000..bea6c98 --- /dev/null +++ b/schulung_tools/ipc_shm/README @@ -0,0 +1,30 @@ +#!/bin/sh + +# build programs send/recv +make + +# find uprobe offsets (search for "uprobe") +objdump -D -F -S send | less +objdump -D -F -S recv | less + +# create uprobe events (as root) +echo "p:sending `pwd`/send:0x1055" > /sys/kernel/debug/tracing/uprobe_events +echo "p:received `pwd`/recv:0xff1" >> /sys/kernel/debug/tracing/uprobe_events + +# run receiver +sudo taskset 1 chrt -f 80 ./recv & + +# run sender (wrapping with trace-cmd) +sudo trace-cmd record \ + -e sched:sched_switch \ + -e sched:sched_wakeup \ + -e sched:sched_pi_setprio \ + -e uprobes:sending \ + -e uprobes:received \ + -e raw_syscalls:sys_enter \ + -e raw_syscalls:sys_exit \ + taskset 1 chrt -f 70 ./send +(type message and hit return) + +# view results +kernelshark |
