All of lore.kernel.org
 help / color / mirror / Atom feed
* [LSF/MM TOPIC] drgn, a scriptable debugger
@ 2019-02-22 19:27 Omar Sandoval
  0 siblings, 0 replies; only message in thread
From: Omar Sandoval @ 2019-02-22 19:27 UTC (permalink / raw)
  To: lsf-pc, bpf

Hello,

I've already sent in an attend request for the I/O track, but I'd also
like to propose my project, drgn [1], as a topic for the BPF/tracing
track.

Basically, drgn is a more intuitive replacement for crash(8) which
exposes kernel types and variables to Python. For example, one can
trivially access common kernel structures:

>>> init = find_task(prog, 1)
>>> fd = fget(init, 3)
>>> fd.f_inode.i_sb.s_type.name
(const char *)0xffffffff862bf29c = "devtmpfs"

Since it's just Python, it's also easy to do more complex analysis:

>>> sum(1 for _ in list_for_each(fd.f_inode.i_sb.s_inodes.address_of_()))
491

I've been using this to debug issues in production at Facebook. Since
the project is relatively new, some of it is still in flux. I'm
currently rewriting the core components in C for performance reasons.
Next after that is improved documentation as well as stack trace
support, which is the biggest missing feature. Regardless, it's already
proven quite useful, so I'd love a chance to talk about it and gather
feedback.

Thanks!

1: https://github.com/osandov/drgn

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-02-22 19:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-22 19:27 [LSF/MM TOPIC] drgn, a scriptable debugger Omar Sandoval

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.