Merge pull request #850 from likewhatevs/fix-lsp-for-vmlinux

fix lsp to work after multiarch support
This commit is contained in:
likewhatevs 2024-10-24 17:37:57 +00:00 committed by GitHub
commit d30bdbbc46
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 24 additions and 4 deletions

1
scheds/include/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
vmlinux.h

View File

@ -9,7 +9,7 @@
#ifdef LSP
#define __bpf__
#include "../vmlinux/vmlinux.h"
#include "../vmlinux.h"
#else
#include "vmlinux.h"
#endif

View File

@ -10,6 +10,11 @@
#ifndef __USER_EXIT_INFO_H
#define __USER_EXIT_INFO_H
#ifdef LSP
#define __bpf__
#include "../vmlinux.h"
#endif
enum uei_sizes {
UEI_REASON_LEN = 128,
UEI_MSG_LEN = 1024,
@ -25,9 +30,7 @@ struct user_exit_info {
#ifdef __bpf__
#ifdef LSP
#include "../vmlinux/vmlinux.h"
#else
#ifndef LSP
#include "vmlinux.h"
#endif
#include <bpf/bpf_core_read.h>

1
scheds/include/vmlinux.h Symbolic link
View File

@ -0,0 +1 @@
arch/x86/vmlinux.h

View File

@ -1,4 +1,13 @@
/* Copyright (c) Meta Platforms, Inc. and affiliates. */
#ifdef LSP
#define __bpf__
#ifndef LSP_INC
#include "../../../../include/scx/common.bpf.h"
#include "timer.bpf.h"
#endif
#endif
#include <bpf/bpf_core_read.h>
#include <bpf/bpf_helpers.h>
#include <bpf/bpf_tracing.h>

View File

@ -1,6 +1,12 @@
/* Copyright (c) Meta Platforms, Inc. and affiliates. */
#ifndef __LAYERED_TIMER_H
#define __LAYERED_TIMER_H
#ifdef LSP
#define __bpf__
#ifndef LSP_INC
#include "../../../../include/scx/common.bpf.h"
#endif
#endif
#include <bpf/bpf_core_read.h>
#include <bpf/bpf_helpers.h>
#include <bpf/bpf_tracing.h>