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: <1255420082.8392.44.camel@twins>
Date:	Tue, 13 Oct 2009 09:48:02 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	rostedt@...dmis.org
Cc:	mingo@...hat.com, hpa@...or.com, mathieu.desnoyers@...ymtl.ca,
	anton@...ba.org, linux-kernel@...r.kernel.org,
	zhaolei@...fujitsu.com, xiaoguangrong@...fujitsu.com,
	fweisbec@...il.com, tglx@...utronix.de,
	kosaki.motohiro@...fujitsu.com, linux-tip-commits@...r.kernel.org
Subject: Re: [tip:timers/tracing] hrtimer: Add tracepoint for hrtimers

On Mon, 2009-10-12 at 23:25 -0400, Steven Rostedt wrote:
> > +     TP_printk("hrtimer %p, func %pf, expires %llu, softexpires %llu",
> > +               __entry->timer, __entry->function,
> > +               (unsigned long long)ktime_to_ns((ktime_t) {
> > +                               .tv64 = __entry->expires }),
> > +               (unsigned long long)ktime_to_ns((ktime_t) {
> > +                               .tv64 = __entry->softexpires }))
> > +);
> > +
> 
> I was just fixing up the trace-cmd parser (which is also used for perf)
> and came across this code. That TP_printk shows up in the format file
> as:
> 
> print fmt: "hrtimer %p, func %pf, expires %llu, softexpires %llu", REC->timer, REC->function, (unsigned long long)(((ktime_t) { .tv64 = REC->expires }).tv64), (unsigned long long)(((ktime_t) { .tv64 = REC->softexpires }).tv64)
> 
> Now I'm trying to parse this with a tool so that we can have something
> that can read the binary output, and be able to easily figure it out by
> reading the format files. But trying to parse:
> 
> (unsigned long long)(((ktime_t) { .tv64 = REC->expires }).tv64)
> 
> Is not easy. It's basically implementing a C interpreter :-(
> 
> Is there anyway we can change that TRACE_EVENT to give us a better,
> trace printk output?

LOL

Either convince tglx that ktime_t really ought to die for good (yeah, I
know arm), or specialize the whole printout for 32 vs 64 ktime_t.

union ktime {
        s64     tv64;
#if BITS_PER_LONG != 64 && !defined(CONFIG_KTIME_SCALAR)
        struct {
# ifdef __BIG_ENDIAN
        s32     sec, nsec;
# else
        s32     nsec, sec;
# endif
        } tv;
#endif
};


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