Giter VIP home page Giter VIP logo

Comments (7)

brho avatar brho commented on May 21, 2024 2

probably due to a change in libbpf. perhaps you're using a newer one than we are. i see other some commits in libbpf-tools zero-initializing globals.

the fix would be to zero initialize the globals in all of our tools.

from ghost-userspace.

jackhumphries avatar jackhumphries commented on May 21, 2024 1

Thanks, I'll take a look tomorrow. If it turns out the zero-initialization isn't guaranteed by the standard, then I'll push a commit to fix this. Otherwise I'll figure out what the real issue is and post here.

from ghost-userspace.

NGUETOUM avatar NGUETOUM commented on May 21, 2024

Hello,
me I have meet this error and to solve this problem, I have just initialize some variable in
the following file : third_party/bpf/schedghostidle.bpf.c.
In that file I have just initialize the following variable:
uint64_t nr_latches = 0;
uint64_t nr_bpf_latches = 0;
uint64_t nr_idle_to_bpf_latches = 0;
Try to do it and we will see if it work on your project.

from ghost-userspace.

GoWest279 avatar GoWest279 commented on May 21, 2024

@NGUETOUM Thanks so much!
It solved the compile problem. Just not sure whether those variables should be initialized to specific values. I am going to try some example benchmark to see what will happen:)

from ghost-userspace.

jackhumphries avatar jackhumphries commented on May 21, 2024

@john-liu2039 They should be initialized to 0. I need to look into why this is causing compile issues on your end since the global variables should be zero-initialized by default just as they would be in a userspace program. What version of clang are you using?

from ghost-userspace.

GoWest279 avatar GoWest279 commented on May 21, 2024

Thanks, @jackhumphries :) My clang setup is as follows:

clang version 10.0.0-4ubuntu1 
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

BTW, I set up the ghost kernel and userspace with the VMware virtual machine.
Thanks so much for your help!

from ghost-userspace.

jackhumphries avatar jackhumphries commented on May 21, 2024

Thanks Barret.

I have explicitly initialized the BPF global variables to 0 in our internal Google codebase. This will make its way out to the open source codebase soon.

from ghost-userspace.

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.