Re: Regarding genevent to instrument cramfs filesystem in linux..
Mathieu Desnoyers <[email protected]> Thu, 9 Aug 2007 15:12:49 -0400
| Newsgroups | gmane.linux.kernel.tracing |
|---|---|
| Message-ID | <20070809191249.GB25599@Krystal> |
* satish ([email protected]) wrote: > HI.. > Iam newbie to genevent ... iam using sources: > > linux kernel: 2.6.18 > > LTTng: 0.6.41 > > ltt-control : 0.30 > > LTTV: 0.8.72 > > genevent : 0.31 > > > what is the procedure to add new events to kernel using genevent...?? how to add new event to facility.xml??? > ex: iam having cramfs_read function ... i want to know the time taken for each call... > > > Regards > satish Please have a look at the README file in the genevent package first. It describes how genevent is used. You will, in addition, have to add markers to the kernel code. In this old version, those were expressed with MARK(), such as: MARK(kernel_sched_wakeup_new_task, "%d %ld", p->pid, p->state); (this one was in kernel/sched.c). Give it the name you want (such a cramfs_myevent1), and make the format string match the arguments. Then, add a ltt/probes/ltt-probe/cramfs.c probe. See other probes as example. The markers probed, in this version, must match the XML description (that must be in your trace in the eventdefs subdirectory) and be enumerated in the same order. Then, you have to create a ltt/facilities/ltt-facility-cramfs.c where you put the code generated by running genevent on the XML description. All this burden is not necessary anymore in the versions I am currently working on. *relief* Then, -- Mathieu Desnoyers Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68