Coder Social home page Coder Social logo

bcc-sys's People

Contributors

brayniac avatar javierhonduco avatar jvns avatar photoszzt avatar pwang7 avatar tobz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bcc-sys's Issues

support bcc 0.16.0

BCC 0.16.0 is out, we should generate bindings and release a new version.

Missing ring buffer API

One line summary of the issue here
Missing ring buffer API.

briefly answer these questions:

  • what did you expect?
    To use BPF ring buffer with rust-bpf

  • what actually happened?
    Currently bcc-sys doesn't have ring buffer related API, but bcc does.
    The ring buffer API definition in bcc is here.

  • what steps can we take to reproduce the behavior you saw?
    bpf_new_ringbuf, bpf_free_ringbuf, bpf_add_ringbuf, bpf_poll_ringbuf, bpf_consume_ringbuf are not defined bcc-sys.

Problem with building a static binary

What did I expect?

When trying to build a static library using cargo build --features v0_10_0 static I would have expected that cargo would try to link against a statically compiled LLVM.

What actually happened?

Instead cargo tried linking against a dynamically compiled LLVM. The error message I got was:

vagrant@ubuntu-bionic:~/rust-bpf/bcc-sys$ cargo build --features v0_10_0 static
   Compiling bcc-sys v0.10.3-alpha.0 (/home/vagrant/rust-bpf/bcc-sys)
error: could not find native static library 'LLVM-6.0', perhaps an -L flag is missing?

error: aborting due to previous error

error: Could not compile 'bcc-sys'.

To learn more, run the command again with --verbose.

There is no libllvm-6.0.a file and from what I understand from running llvm-config --libs --link-static you need to compile against all the static libraries that this command outputs. Adding .args(--link-static) to the build.rs fixed the issue for me. I'm happy to open a PR with this fix.

What steps can we take to reproduce the behaviour you saw?

I'm running ubuntu 18.04 with version 6.0 of the LLVM toolchain. Other steps are described above.

bcc 0.16.0 bindings have different size_t

Looks like the bcc 0.16.0 bindings (which were generated with bindgen 0.55.1 have size_t defined as pub type size_t = ::std::os::raw::c_ulong; where previous bindings had usize parameters.

Ran into this trying to add bcc 0.16.0 support to the main bcc crate. Need to figure out what the right solution is here.

See rust-lang/rust-bindgen#1671 for more details on the underlying bindgen change and discussion

miss batch method

i found that kernel code has been supporting bpf batch update for a while, and i found bpf_map_update_batch and other methods in iovisor/bcc, when using objdump to locate symbol in the libbcc, i also find symbols which contain 'batch'
objdump -S usr/lib/libbcc.so | grep batch

segfault with x86_64 musl target

The smoketest segfaults when built with the x86_64-unknown-linux-musl target. This would block support on Alpine and other musl libc based distributions or when building with musl toolchain on "normal" glibc based distributions.

Reported in rust-bpf/rust-bcc#166

x86_64-unknown-linux-musl is currently a tier 2 target for Rust (https://forge.rust-lang.org/release/platform-support.html)

I'd take a PR that addresses this, but I don't think we're going to support x86_64-unknown-linux-musl as tier 1 for the rust-bpf projects at this time.

bcc USDT bindings

bcc-sys could have bindings for bcc's User Statically-Defined Tracing (USDT) probes.

@brayniac mentioned:

It looks like we don't have anything in the bcc-sys bindings for USDT yet (searching in the repo for 'usdt' shows nothing). It's possible that some simple change is needed in the bindgen config (build.rs file) to allow USDT related bindings to be generated.

These bindings would allow to add USDT support to rust-bcc (see rust-bpf/rust-bcc#167).


I might take this on myself and report progress here depending on time and motivation.

Special trick(s) to repeatably generate bindings?

I've searched high and low through issues and PRs and I've struggled to identify an answer, so figured I'd reach out here...

Is there a special trick to repeatably generating bindings? I'm able to run the command locally, using Ubuntu 20.04 and a system-managed installation of the BCC suite. That's on a local development machine where I've installed countless packages/dependencies over time, though.

However, attempting the same thing on a clean Ubuntu install, following the same steps as the CI scripts, results in a useless error from bindgen about missing layout information, which I'm lead to believe indicates that I'm missing a dependency, either directly or indirectly by having a fubar'd library/package path.

I tried looking at the latest clean run of the CI for this repo itself, but it was so long ago that Github Actions doesn't even have the logs anymore. Thus, I'm here. :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.