Re: logging data to a file.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Greg KH wrote:
> On Fri, Nov 04, 2005 at 09:34:20AM -0800, Tim Bird wrote:
> 
>>I have trace data that I export to user space via procfs, using
>>seq_file operations.  I copied this technique from Ingo Molnar's
>>code to trace preemption issues, and it has been working well
>>for my tracing system.
>>
>>Patches are available at:
>>http://tree.celinuxforum.org/CelfPubWiki/KernelFunctionTrace
>>(follow the link under Downloads to the CELF patch archive,
>>and look for kft-all-in-one-2.6.12.patch.  Sorry, patches
>>for later kernels are not available yet.)
> 
> For later kernels, you should use relayfs, as this is exactly what it
> was made for.  Hm, I think there is a trace patch for this exact reason
> that uses relayfs too :)
>
I've been waiting for relayfs to stabilize and get mainlined.
Now that it has, I'll take a look at it again.
One thing that didn't work for me before was that it ONLY
supported per-cpu buffering.  I prefer a single buffer
(I know it causes cache thrashing, but I have my reasons).
Also, having to mount it is really a pain.

> 
> Please please please do not abuse procfs for this kind of thing anymore,
> we are _really_ trying to clean this stuff up and even with
> out-of-the-tree patches like this, it sends the wrong message (and
> people copy code for this stuff from everywhere...)

Like I did from Ingo?  Sheesh, I thought he was a reliable
source.  ;-)

I agree proliferation of the wrong thing is bad.
I realized I had a lot of cleanup work to do before
submitting my own tracing thing to mainline, which is
why I've never sent it in.  But we've been using it
at Sony for years now and it's proven very useful.

I'm about to start work on 2.6.14 myself, so I'll
check out the status of relayfs and see if I can make
it work for me.  I hate to replace a very simple
system that's working for me with a complicated
one that doesn't quite, though.

As an aside, what trace patch that uses relayfs
are you referring - an updated LTT or something else?
There appear to be no in-kernel users of relayfs
to use for an example.

Thanks,
 -- Tim

=============================
Tim Bird
Architecture Group Chair, CE Linux Forum
Senior Staff Engineer, Sony Electronics
=============================


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux