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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c62985530901300455h55695931nb67936e0e5b54aeb@mail.gmail.com>
Date:	Fri, 30 Jan 2009 13:55:50 +0100
From:	Frédéric Weisbecker <fweisbec@...il.com>
To:	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Ingo Molnar <mingo@...e.hu>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] tracing/ftrace: better manage the context info for events

2009/1/30 Arnaldo Carvalho de Melo <acme@...stprotocols.net>:
> Em Fri, Jan 30, 2009 at 10:34:46AM -0200, Arnaldo Carvalho de Melo escreveu:
>> Em Fri, Jan 30, 2009 at 12:59:05AM -0800, Frederic Weisbecker escreveu:
>> > Impact: make trace_event more convenient for tracers
>> >
>> > All tracers (for the moment) that use the struct trace_event want to have
>> > the context info printed before their own output: the pid/cmdline, cpu, and timestamp.
>> >
>> > But some other tracers that want to implement their trace_event callbacks will
>> > not necessary need these information or they may want to format them as they want.
>> >
>> > This patch adds a new default-enabled trace option: TRACE_ITER_CONTEXT_INFO
>> > When disabled through:
>> >
>> > echo nocontext-info > /debugfs/tracing/trace_options
>> >
>> > The pid, cpu and timestamps headers will not be printed.
>> >
>> > IE with the sched_switch tracer with context-info (default):
>> >
>> >             bash-2935  [001]   100.356561:   2935:120:S ==> [001]     0:140:R <idle>
>> >           <idle>-0     [000]   100.412804:      0:140:R   + [000]    11:115:S events/0
>> >           <idle>-0     [000]   100.412816:      0:140:R ==> [000]    11:115:R events/0
>> >         events/0-11    [000]   100.412829:     11:115:S ==> [000]     0:140:R <idle>
>> >
>> > Without context-info:
>> >
>> >   2935:120:S ==> [001]     0:140:R <idle>
>> >      0:140:R   + [000]    11:115:S events/0
>> >      0:140:R ==> [000]    11:115:R events/0
>> >     11:115:S ==> [000]     0:140:R <idle>
>> >
>> > A tracer can disable it at runtime by clearing the bit TRACE_ITER_CONTEXT_INFO in trace_flags.
>> >
>> > Moreover, two callbacks have been added inside trace_event:
>> > _ context_info() which let a tracer override the format of the context info
>> > _ lat_context_info() which do the same with the latency_trace file
>> >
>> > If they are not defined, the usual way of printing the context info will be used.
>>
>> Please wait a bit, I'm trying to use it and the first thing I notice was
>> that I need the trace_iterator in the context callback, to get the
>> timestamp.
>
> Sorry, false alarm, the iterator is there, I was trying to build the
> whole binary trace record in the trace_event->bin(), but its not
> possible, so I'll do it in two function calls context + trace.
>
> - Arnaldo
>

Do you need the trace_iterator from one of your event print callback?
Such as in bin() ?
--
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