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]
Date:	Tue, 03 Nov 2015 19:58:26 -0600
From:	Tom Zanussi <tom.zanussi@...ux.intel.com>
To:	Namhyung Kim <namhyung@...nel.org>
Cc:	rostedt@...dmis.org, daniel.wagner@...-carit.de,
	masami.hiramatsu.pt@...achi.com, josh@...htriplett.org,
	andi@...stfloor.org, mathieu.desnoyers@...icios.com,
	peterz@...radead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v11 22/28] tracing: Add enable_hist/disable_hist triggers

On Tue, 2015-11-03 at 17:55 +0900, Namhyung Kim wrote:
> On Thu, Oct 22, 2015 at 01:14:26PM -0500, Tom Zanussi wrote:
> > Similar to enable_event/disable_event triggers, these triggers enable
> > and disable the aggregation of events into maps rather than enabling
> > and disabling their writing into the trace buffer.
> > 
> > They can be used to automatically start and stop hist triggers based
> > on a matching filter condition.
> > 
> > If there's a paused hist trigger on system:event, the following would
> > start it when the filter condition was hit:
> > 
> >   # echo enable_hist:system:event [ if filter] > event/trigger
> > 
> > And the following would disable a running system:event hist trigger:
> > 
> >   # echo disable_hist:system:event [ if filter] > event/trigger
> 
> What about named hist triggers?  Maybe worth adding
> "enable/disable_hist_name" too?
> 

enable_disable_hist should work fine with both named and unnamed hist
triggers.  As an example, the below sets a couple each of both named and
unnamed triggers and enables and disables them using
enable/disable_hist.  Running this I got the expected output i.e. there
were events captured in both named and unnamed histograms:

echo 'hist:name=foo:keys=skbaddr.hex:vals=len:pause if len < 0' > /sys/kernel/debug/tracing/events/net/netif_receive_skb/trigger
echo 'hist:name=foo:keys=skbaddr.hex:vals=len:pause if len > 256' > /sys/kernel/debug/tracing/events/net/netif_receive_skb/trigger
echo 'hist:keys=skbaddr.hex:vals=len:pause if len == 256' > /sys/kernel/debug/tracing/events/net/netif_receive_skb/trigger
echo 'hist:keys=skbaddr.hex:vals=len:pause' > /sys/kernel/debug/tracing/events/net/netif_receive_skb/trigger

echo 'enable_hist:net:netif_receive_skb if filename==/usr/bin/wget' > /sys/kernel/debug/tracing/events/sched/sched_process_exec/trigger
echo 'disable_hist:net:netif_receive_skb if comm==wget' > /sys/kernel/debug/tracing/events/sched/sched_process_exit/trigger

Thanks,

Tom

> Thanks,
> Namhyung
> 
> 
> > 
> > See Documentation/trace/events.txt for real examples.
> > 
> > Signed-off-by: Tom Zanussi <tom.zanussi@...ux.intel.com>
> > Tested-by: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>


--
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