From mboxrd@z Thu Jan 1 00:00:00 1970 From: laijs@cn.fujitsu.com (Lai Jiangshan) Date: Fri, 16 Jan 2009 14:47:02 +0800 Subject: [ltt-dev] [PATCH v2] add tracepoints of panic and kexec In-Reply-To: <20090112163201.GA26647@Krystal> References: <4949BD17.2000704@cn.fujitsu.com> <4949BD46.3020806@cn.fujitsu.com> <20081218041402.GA21563@Krystal> <4949E1C3.7000308@cn.fujitsu.com> <4949E1F1.7020505@cn.fujitsu.com> <20081218184745.GA20815@Krystal> <62826BBD9D1A43129074C551483312DB@zhaoleiwin> <20090103140253.GA15280@Krystal> <38655DB9B3A5475FBB2528A1764F7336@zhaoleiwin> <20090112163201.GA26647@Krystal> Message-ID: <49702D66.80609@cn.fujitsu.com> Mathieu Desnoyers wrote: > * Zhaolei (zhaolei at cn.fujitsu.com) wrote: >> * From: "Mathieu Desnoyers" >>> * Zhaolei (zhaolei at cn.fujitsu.com) wrote: >>>> * From: "Mathieu Desnoyers" >>>>> * Zhaolei (zhaolei at cn.fujitsu.com) wrote: >>>>>> Instrumentation of following panic and kexec related events are added: >>>>>> panic >>>>>> kernel_kexec >>>>>> crash_kexec >>>>>> >>>>>> It is useful for build flight-recorder program based on lttng infrastructure. >>>>>> >>>>> Hrm, I'm wondering if these are events we are interested to trace or if >>>>> you plan to use these tracepoints as hooks into the kernel to connect >>>>> the tracer infrastructure to it ? >>>> Hello, Mathieu >>>> >>>> IMHO, both. >>>> >>>> As a programmer who want to build flight-recorder based on lttng infrastructure, >>>> he can: >>>> 1: use lttng trace, and get lttng's trace datas from kernel-dump file. >>>> or >>>> 2: use lttng's tracepoint, and record events himself. >>>> >>>> But as a lttng's programmer, we can make both way possible. >>>> >>>> What is your opinion? >>>> >>> Yes, I think having both is good. So we could add, separately : >>> >>> A hook in panic and kexec using include/linux/notifier.h so mechanisms >>> other than tracers can connect their hook to it. >>> >>> Also add a tracepoint so tracers can use this as an event source. >>> >>> I would do both in separate patches though, because they have different >>> purposes. >> Hello, Mathieu >> >> Are you means you will do both in next version of lttng? >> Thanks! >> > > Hi Zhaolei, > > I won't create the patches myself because I don't see it as a priority > (Linus said he would refuse any instrumentation patch before we get the > data output mechanism into the kernel), but if someone provides patches Hi, Mathieu, You *forgot* one thing: we are lttng *users*, not only developers. I don't think it's good that you just heard the God only. lttng is used by her users at the end. User's need is one of the first class things to concern. > to add notifier feature to kexec and panic so we can plug LTTng into > them to extract traces from a crashed kernel, I would be very interested > to add this. OTOH, about the tracepoints, I am not convinced they are > necessary for now, because we already instrument printk which logs some > information on panic(). Maybe kexec would be better suited for > instrumentation. We need to know the time and other information that panic happened. And output message is integrated in lttng with other messages. I don't think it's bad idea which we use for a long time. And this is a *key message*, event should be generated efficient/elegant. Sorry for participated in this discuss with bad manners. Thanks, Lai. > > Also, it would be good to provide the LTTng probes for the tracepoints > you add in a separate patch within the same patchset > (ltt/probes/*-trace.c). > > Thanks, > > Mathieu >