lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACh+v5NqzGWi+g+cSO65UJOfcajq721HUoAjN__BWqLLOG3zkA@mail.gmail.com>
Date:	Fri, 27 Dec 2013 15:54:29 +0100
From:	Jean-Jacques Hiblot <jjhiblot@...phandler.com>
To:	Tom Zanussi <tom.zanussi@...ux.intel.com>,
	Steven Rostedt <rostedt@...dmis.org>
Cc:	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Tracing events with GPIOs

Hi Tom, Steven,

I'm currently doing some tests with the event triggers
(git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
for-next).
At the moment I can't use event triggers with probes dynamically
created (with perf probe or via
/sys/kernel/debug/tracing/kprobe_events)
Predefined probes like
/sys/kernel/debug/tracing/events/kmem/kmalloc/trigger are working
fine.
Am I missing something ?

example:

----------------------------------------------------------------
with a predefined probe
----------------------------------------------------------------

prompt> echo 'stacktrace' >
/sys/kernel/debug/tracing/events/kmem/kmalloc/trigger
prompt> ls
prompt> cat /sys/kernel/debug/tracing/trace
# tracer: nop
#
# entries-in-buffer/entries-written: 14/14   #P:1
#
#                              _-----=> irqs-off
#                             / _----=> need-resched
#                            | / _---=> hardirq/softirq
#                            || / _--=> preempt-depth
#                            ||| /     delay
#           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
#              | |       |   ||||       |         |
              ls-971   [000] ....   298.050000: <stack trace>
 => ftrace_raw_event_kmem_alloc
 => kmem_cache_alloc_trace
 => do_execve
 => SyS_execve
 => ret_fast_syscall
              ls-971   [000] ....   298.050000: <stack trace>
 => ftrace_raw_event_kmem_alloc
 => kmem_cache_alloc_trace
 => load_elf_binary
[...]

----------------------------------------------------------------
with a dynamically defined probe
----------------------------------------------------------------

prompt> perf probe -a in_kmalloc=__kmalloc
prompt> echo 'stacktrace' >
/sys/kernel/debug/tracing/events/probe/in_kmalloc/trigger
prompt> perf record -e probe:in_kmalloc -aR sleep 10&
[... do something here ...]
prompt> perf report
[...]
# Samples: 24  of event 'probe:in_kmalloc'
# Event count (approx.): 24
#
# Overhead  Command      Shared Object         Symbol
# ........  .......  .................  .............
#
    50.00%       ls  [kernel.kallsyms]  [k] __kmalloc
    12.50%    sleep  [kernel.kallsyms]  [k] __kmalloc
    12.50%       sh  [kernel.kallsyms]  [k] __kmalloc
    12.50%     perf  [kernel.kallsyms]  [k] __kmalloc
    12.50%     more  [kernel.kallsyms]  [k] __kmalloc
[...]

prompt> cat /sys/kernel/debug/tracing/trace
# tracer: nop
#
# entries-in-buffer/entries-written: 0/0   #P:1
#
#                              _-----=> irqs-off
#                             / _----=> need-resched
#                            | / _---=> hardirq/softirq
#                            || / _--=> preempt-depth
#              random: nonblocking pool is initialized
              ||| /     delay
#           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
#              | |       |   ||||       |         |
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ