Receive tools/sched_ext updates form https://github.com/sched-ext/scx to sync userspace bits: - scx_bpf_dump_header() added which can be used to print out basic scheduler info on dump. - BPF possible/online CPU iterators added. - CO-RE enums added. The enums are autogenerated from vmlinux.h. Include the generated artifacts in tools/sched_ext to keep the Makefile simpler. - Other misc changes. Signed-off-by: Tejun Heo <tj@kernel.org>
27 lines
595 B
C
27 lines
595 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Define struct scx_enums that stores the load-time values of enums
|
|
* used by the BPF program.
|
|
*
|
|
* Copyright (c) 2024 Meta Platforms, Inc. and affiliates.
|
|
*/
|
|
|
|
#ifndef __SCX_ENUMS_H
|
|
#define __SCX_ENUMS_H
|
|
|
|
static inline void __ENUM_set(u64 *val, char *type, char *name)
|
|
{
|
|
bool res;
|
|
|
|
res = __COMPAT_read_enum(type, name, val);
|
|
SCX_BUG_ON(!res, "enum not found(%s)", name);
|
|
}
|
|
|
|
#define SCX_ENUM_SET(skel, type, name) do { \
|
|
__ENUM_set(&skel->rodata->__##name, #type, #name); \
|
|
} while (0)
|
|
|
|
|
|
#include "enums.autogen.h"
|
|
|
|
#endif /* __SCX_ENUMS_H */
|