Giter Club home page Giter Club logo

Comments (5)

brendangregg avatar brendangregg commented on August 25, 2024

Maybe the assembly output has something to do with LLVMInitializeBPFAsmPrinter() in src/ast/codegen_llvm.cpp.

from bpftrace.

williangaspar avatar williangaspar commented on August 25, 2024

Something happens in this for loop that makes it print out the bytecode. But Idk what it is.

src/attached_probe.cpp

for (int attempt=0; attempt<3; attempt++)
  {
    progfd_ = bpf_prog_load(progtype(probe_.type), namep,
        reinterpret_cast<struct bpf_insn*>(insns), prog_len, license,
        kernel_version(attempt), log_level, log_buf, log_buf_size);
    if (progfd_ >= 0)
      break;
  }

from bpftrace.

brendangregg avatar brendangregg commented on August 25, 2024

It's coming out of bpf_prog_load()? We can read that code, it's in bcc: https://github.com/iovisor/bcc/blob/3835b2d85e70f18eecff71c7b66d9f416ec1bcd5/src/cc/libbpf.c#L467 .. maybe we need to set log_level.

from bpftrace.

williangaspar avatar williangaspar commented on August 25, 2024

yep. log_level is the one setting the bytecode. The problem is when I call with a -d, AttachedProbe::load_prog is not beem called. Only when I pass a -v

from bpftrace.

mmarchini avatar mmarchini commented on August 25, 2024

We can start by increasing verbosity for -v (as Brendan suggested in the OP) and add make this work for -d as well in the future.

from bpftrace.

Related Issues (20)

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.