rust-bpf / rust-bcc

user-friendly rust bindings for the bpf compiler collection
MIT License
475 stars 54 forks source link

Add USDT support. #171

Closed tobz closed 3 years ago

tobz commented 3 years ago

This PR adds USDT support, based on a transliteration of the Python implementation in iovisor/bcc.

There's a lot of "icing" here as well: cleaning up styling, formatting, condensing code, etc.

Closes #167

brayniac commented 3 years ago

Thanks for working on this. Overall it looks pretty good.

brayniac commented 3 years ago

There's a few other things that clippy is pointing out in this PR. Would be good to address the ones in the new code (src/usdt/mod.rs) - I think I commented on the only new one in core, there's some existing code causing some clippy warnings which can be ignored for the sake of this PR.

javierhonduco commented 3 years ago

Very interested in this! Happy to take a look once it's ready for review! :)

tobz commented 3 years ago

Went through and did a bunch of cleanup and various bits, namely....

I realize that the CString stuff might be too noisy when trying to properly review the core aspect of this PR -- USDT support -- so I'm happy to revert those changes if need be.

brayniac commented 3 years ago

Thanks @tobz - this is looking pretty solid now. I'll do one more pass of review once CI is green. Appreciate the contribution.