Skip to content

Commit

Permalink
regenerate bindgens
Browse files Browse the repository at this point in the history
  • Loading branch information
likewhatevs committed Dec 4, 2024
1 parent 60f2403 commit aa519f5
Showing 1 changed file with 101 additions and 65 deletions.
166 changes: 101 additions & 65 deletions scheds/rust/scx_layered/src/bpf_intf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,6 @@ pub type s64 = ::std::os::raw::c_longlong;
pub type u16_ = ::std::os::raw::c_ushort;
pub type u32_ = ::std::os::raw::c_uint;
pub type u64_ = ::std::os::raw::c_ulonglong;
pub const ravg_consts_RAVG_VAL_BITS: ravg_consts = 44;
pub const ravg_consts_RAVG_FRAC_BITS: ravg_consts = 20;
pub type ravg_consts = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ravg_data {
pub val: u64_,
pub val_at: u64_,
pub old: u64_,
pub cur: u64_,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of ravg_data"][::std::mem::size_of::<ravg_data>() - 32usize];
["Alignment of ravg_data"][::std::mem::align_of::<ravg_data>() - 8usize];
["Offset of field: ravg_data::val"][::std::mem::offset_of!(ravg_data, val) - 0usize];
["Offset of field: ravg_data::val_at"][::std::mem::offset_of!(ravg_data, val_at) - 8usize];
["Offset of field: ravg_data::old"][::std::mem::offset_of!(ravg_data, old) - 16usize];
["Offset of field: ravg_data::cur"][::std::mem::offset_of!(ravg_data, cur) - 24usize];
};
pub const consts_CACHELINE_SIZE: consts = 64;
pub const consts_MAX_CPUS_SHIFT: consts = 9;
pub const consts_MAX_CPUS: consts = 512;
Expand All @@ -55,9 +35,11 @@ pub const consts_MAX_LAYER_WEIGHT: consts = 10000;
pub const consts_MIN_LAYER_WEIGHT: consts = 1;
pub const consts_DEFAULT_LAYER_WEIGHT: consts = 100;
pub const consts_USAGE_HALF_LIFE: consts = 100000000;
pub const consts_LAYER_LAT_DECAY_FACTOR: consts = 4;
pub const consts_RUNTIME_DECAY_FACTOR: consts = 4;
pub const consts_LAYER_LAT_DECAY_FACTOR: consts = 32;
pub const consts_HI_FALLBACK_DSQ_BASE: consts = 1024;
pub const consts_LO_FALLBACK_DSQ: consts = 1089;
pub const consts_MAX_DSQS: consts = 1090;
pub const consts_MAX_CGRP_PREFIXES: consts = 32;
pub const consts_NSEC_PER_USEC: consts = 1000;
pub const consts_NSEC_PER_MSEC: consts = 1000000;
Expand All @@ -70,7 +52,9 @@ pub const layer_kind_LAYER_KIND_CONFINED: layer_kind = 2;
pub type layer_kind = ::std::os::raw::c_uint;
pub const layer_usage_LAYER_USAGE_OWNED: layer_usage = 0;
pub const layer_usage_LAYER_USAGE_OPEN: layer_usage = 1;
pub const layer_usage_NR_LAYER_USAGES: layer_usage = 2;
pub const layer_usage_LAYER_USAGE_SUM_UPTO: layer_usage = 1;
pub const layer_usage_LAYER_USAGE_PROTECTED: layer_usage = 2;
pub const layer_usage_NR_LAYER_USAGES: layer_usage = 3;
pub type layer_usage = ::std::os::raw::c_uint;
pub const global_stat_id_GSTAT_EXCL_IDLE: global_stat_id = 0;
pub const global_stat_id_GSTAT_EXCL_WAKEUP: global_stat_id = 1;
Expand Down Expand Up @@ -101,9 +85,10 @@ pub const layer_stat_id_LSTAT_YIELD_IGNORE: layer_stat_id = 21;
pub const layer_stat_id_LSTAT_MIGRATION: layer_stat_id = 22;
pub const layer_stat_id_LSTAT_XNUMA_MIGRATION: layer_stat_id = 23;
pub const layer_stat_id_LSTAT_XLLC_MIGRATION: layer_stat_id = 24;
pub const layer_stat_id_LSTAT_XLAYER_WAKE: layer_stat_id = 25;
pub const layer_stat_id_LSTAT_XLAYER_REWAKE: layer_stat_id = 26;
pub const layer_stat_id_NR_LSTATS: layer_stat_id = 27;
pub const layer_stat_id_LSTAT_XLLC_MIGRATION_SKIP: layer_stat_id = 25;
pub const layer_stat_id_LSTAT_XLAYER_WAKE: layer_stat_id = 26;
pub const layer_stat_id_LSTAT_XLAYER_REWAKE: layer_stat_id = 27;
pub const layer_stat_id_NR_LSTATS: layer_stat_id = 28;
pub type layer_stat_id = ::std::os::raw::c_uint;
pub const llc_layer_stat_id_LLC_LSTAT_LAT: llc_layer_stat_id = 0;
pub const llc_layer_stat_id_LLC_LSTAT_CNT: llc_layer_stat_id = 1;
Expand Down Expand Up @@ -143,21 +128,31 @@ pub struct cpu_ctx {
pub yielding: bool,
pub try_preempt_first: bool,
pub is_big: bool,
pub layer_usages: [[u64_; 2usize]; 16usize],
pub protect_owned: bool,
pub running_owned: bool,
pub running_at: u64_,
pub layer_usages: [[u64_; 3usize]; 16usize],
pub gstats: [u64_; 2usize],
pub lstats: [[u64_; 27usize]; 16usize],
pub lstats: [[u64_; 28usize]; 16usize],
pub ran_current_for: u64_,
pub owned_usage: u64_,
pub open_usage: u64_,
pub prev_owned_usage: [u64_; 2usize],
pub prev_open_usage: [u64_; 2usize],
pub usage_at_idle: u64_,
pub hi_fallback_dsq_id: u64_,
pub layer_id: u32_,
pub task_layer_id: u32_,
pub llc_id: u32_,
pub node_id: u32_,
pub perf: u32_,
pub open_preempt_layer_order: [u32_; 16usize],
pub open_layer_order: [u32_; 16usize],
pub prox_map: cpu_prox_map,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of cpu_ctx"][::std::mem::size_of::<cpu_ctx>() - 4824usize];
["Size of cpu_ctx"][::std::mem::size_of::<cpu_ctx>() - 5272usize];
["Alignment of cpu_ctx"][::std::mem::align_of::<cpu_ctx>() - 8usize];
["Offset of field: cpu_ctx::cpu"][::std::mem::offset_of!(cpu_ctx, cpu) - 0usize];
["Offset of field: cpu_ctx::current_preempt"]
Expand All @@ -171,38 +166,81 @@ const _: () = {
["Offset of field: cpu_ctx::try_preempt_first"]
[::std::mem::offset_of!(cpu_ctx, try_preempt_first) - 9usize];
["Offset of field: cpu_ctx::is_big"][::std::mem::offset_of!(cpu_ctx, is_big) - 10usize];
["Offset of field: cpu_ctx::protect_owned"]
[::std::mem::offset_of!(cpu_ctx, protect_owned) - 11usize];
["Offset of field: cpu_ctx::running_owned"]
[::std::mem::offset_of!(cpu_ctx, running_owned) - 12usize];
["Offset of field: cpu_ctx::running_at"][::std::mem::offset_of!(cpu_ctx, running_at) - 16usize];
["Offset of field: cpu_ctx::layer_usages"]
[::std::mem::offset_of!(cpu_ctx, layer_usages) - 16usize];
["Offset of field: cpu_ctx::gstats"][::std::mem::offset_of!(cpu_ctx, gstats) - 272usize];
["Offset of field: cpu_ctx::lstats"][::std::mem::offset_of!(cpu_ctx, lstats) - 288usize];
[::std::mem::offset_of!(cpu_ctx, layer_usages) - 24usize];
["Offset of field: cpu_ctx::gstats"][::std::mem::offset_of!(cpu_ctx, gstats) - 408usize];
["Offset of field: cpu_ctx::lstats"][::std::mem::offset_of!(cpu_ctx, lstats) - 424usize];
["Offset of field: cpu_ctx::ran_current_for"]
[::std::mem::offset_of!(cpu_ctx, ran_current_for) - 3744usize];
[::std::mem::offset_of!(cpu_ctx, ran_current_for) - 4008usize];
["Offset of field: cpu_ctx::owned_usage"]
[::std::mem::offset_of!(cpu_ctx, owned_usage) - 4016usize];
["Offset of field: cpu_ctx::open_usage"]
[::std::mem::offset_of!(cpu_ctx, open_usage) - 4024usize];
["Offset of field: cpu_ctx::prev_owned_usage"]
[::std::mem::offset_of!(cpu_ctx, prev_owned_usage) - 4032usize];
["Offset of field: cpu_ctx::prev_open_usage"]
[::std::mem::offset_of!(cpu_ctx, prev_open_usage) - 4048usize];
["Offset of field: cpu_ctx::usage_at_idle"]
[::std::mem::offset_of!(cpu_ctx, usage_at_idle) - 4064usize];
["Offset of field: cpu_ctx::hi_fallback_dsq_id"]
[::std::mem::offset_of!(cpu_ctx, hi_fallback_dsq_id) - 3752usize];
["Offset of field: cpu_ctx::layer_id"][::std::mem::offset_of!(cpu_ctx, layer_id) - 3760usize];
[::std::mem::offset_of!(cpu_ctx, hi_fallback_dsq_id) - 4072usize];
["Offset of field: cpu_ctx::layer_id"][::std::mem::offset_of!(cpu_ctx, layer_id) - 4080usize];
["Offset of field: cpu_ctx::task_layer_id"]
[::std::mem::offset_of!(cpu_ctx, task_layer_id) - 3764usize];
["Offset of field: cpu_ctx::llc_id"][::std::mem::offset_of!(cpu_ctx, llc_id) - 3768usize];
["Offset of field: cpu_ctx::node_id"][::std::mem::offset_of!(cpu_ctx, node_id) - 3772usize];
["Offset of field: cpu_ctx::perf"][::std::mem::offset_of!(cpu_ctx, perf) - 3776usize];
["Offset of field: cpu_ctx::prox_map"][::std::mem::offset_of!(cpu_ctx, prox_map) - 3780usize];
[::std::mem::offset_of!(cpu_ctx, task_layer_id) - 4084usize];
["Offset of field: cpu_ctx::llc_id"][::std::mem::offset_of!(cpu_ctx, llc_id) - 4088usize];
["Offset of field: cpu_ctx::node_id"][::std::mem::offset_of!(cpu_ctx, node_id) - 4092usize];
["Offset of field: cpu_ctx::perf"][::std::mem::offset_of!(cpu_ctx, perf) - 4096usize];
["Offset of field: cpu_ctx::open_preempt_layer_order"]
[::std::mem::offset_of!(cpu_ctx, open_preempt_layer_order) - 4100usize];
["Offset of field: cpu_ctx::open_layer_order"]
[::std::mem::offset_of!(cpu_ctx, open_layer_order) - 4164usize];
["Offset of field: cpu_ctx::prox_map"][::std::mem::offset_of!(cpu_ctx, prox_map) - 4228usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct llc_prox_map {
pub llcs: [u16_; 64usize],
pub node_end: u32_,
pub sys_end: u32_,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of llc_prox_map"][::std::mem::size_of::<llc_prox_map>() - 136usize];
["Alignment of llc_prox_map"][::std::mem::align_of::<llc_prox_map>() - 4usize];
["Offset of field: llc_prox_map::llcs"][::std::mem::offset_of!(llc_prox_map, llcs) - 0usize];
["Offset of field: llc_prox_map::node_end"]
[::std::mem::offset_of!(llc_prox_map, node_end) - 128usize];
["Offset of field: llc_prox_map::sys_end"]
[::std::mem::offset_of!(llc_prox_map, sys_end) - 132usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct llc_ctx {
pub id: u32_,
pub cpumask: *mut bpf_cpumask,
pub nr_cpus: u32_,
pub vtime_now: [u64_; 16usize],
pub queued_runtime: [u64_; 16usize],
pub lstats: [[u64_; 2usize]; 16usize],
pub prox_map: llc_prox_map,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of llc_ctx"][::std::mem::size_of::<llc_ctx>() - 280usize];
["Size of llc_ctx"][::std::mem::size_of::<llc_ctx>() - 672usize];
["Alignment of llc_ctx"][::std::mem::align_of::<llc_ctx>() - 8usize];
["Offset of field: llc_ctx::id"][::std::mem::offset_of!(llc_ctx, id) - 0usize];
["Offset of field: llc_ctx::cpumask"][::std::mem::offset_of!(llc_ctx, cpumask) - 8usize];
["Offset of field: llc_ctx::nr_cpus"][::std::mem::offset_of!(llc_ctx, nr_cpus) - 16usize];
["Offset of field: llc_ctx::lstats"][::std::mem::offset_of!(llc_ctx, lstats) - 24usize];
["Offset of field: llc_ctx::vtime_now"][::std::mem::offset_of!(llc_ctx, vtime_now) - 24usize];
["Offset of field: llc_ctx::queued_runtime"]
[::std::mem::offset_of!(llc_ctx, queued_runtime) - 152usize];
["Offset of field: llc_ctx::lstats"][::std::mem::offset_of!(llc_ctx, lstats) - 280usize];
["Offset of field: llc_ctx::prox_map"][::std::mem::offset_of!(llc_ctx, prox_map) - 536usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
Expand Down Expand Up @@ -306,16 +344,14 @@ pub struct layer {
pub yield_step_ns: u64_,
pub slice_ns: u64_,
pub weight: u32_,
pub xllc_mig_min_ns: u64_,
pub kind: ::std::os::raw::c_int,
pub preempt: bool,
pub preempt_first: bool,
pub exclusive: bool,
pub idle_smt: bool,
pub growth_algo: ::std::os::raw::c_int,
pub vtime_now: u64_,
pub owned_usage_target_ppk: u32_,
pub nr_tasks: u64_,
pub load: u64_,
pub load_rd: ravg_data,
pub cpus_seq: u64_,
pub node_mask: u64_,
pub llc_mask: u64_,
Expand All @@ -328,7 +364,7 @@ pub struct layer {
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of layer"][::std::mem::size_of::<layer>() - 1463328usize];
["Size of layer"][::std::mem::size_of::<layer>() - 1463296usize];
["Alignment of layer"][::std::mem::align_of::<layer>() - 8usize];
["Offset of field: layer::matches"][::std::mem::offset_of!(layer, matches) - 0usize];
["Offset of field: layer::nr_match_ors"]
Expand All @@ -342,29 +378,29 @@ const _: () = {
[::std::mem::offset_of!(layer, yield_step_ns) - 1463064usize];
["Offset of field: layer::slice_ns"][::std::mem::offset_of!(layer, slice_ns) - 1463072usize];
["Offset of field: layer::weight"][::std::mem::offset_of!(layer, weight) - 1463080usize];
["Offset of field: layer::kind"][::std::mem::offset_of!(layer, kind) - 1463084usize];
["Offset of field: layer::preempt"][::std::mem::offset_of!(layer, preempt) - 1463088usize];
["Offset of field: layer::xllc_mig_min_ns"]
[::std::mem::offset_of!(layer, xllc_mig_min_ns) - 1463088usize];
["Offset of field: layer::kind"][::std::mem::offset_of!(layer, kind) - 1463096usize];
["Offset of field: layer::preempt"][::std::mem::offset_of!(layer, preempt) - 1463100usize];
["Offset of field: layer::preempt_first"]
[::std::mem::offset_of!(layer, preempt_first) - 1463089usize];
["Offset of field: layer::exclusive"][::std::mem::offset_of!(layer, exclusive) - 1463090usize];
["Offset of field: layer::idle_smt"][::std::mem::offset_of!(layer, idle_smt) - 1463091usize];
[::std::mem::offset_of!(layer, preempt_first) - 1463101usize];
["Offset of field: layer::exclusive"][::std::mem::offset_of!(layer, exclusive) - 1463102usize];
["Offset of field: layer::growth_algo"]
[::std::mem::offset_of!(layer, growth_algo) - 1463092usize];
["Offset of field: layer::vtime_now"][::std::mem::offset_of!(layer, vtime_now) - 1463096usize];
["Offset of field: layer::nr_tasks"][::std::mem::offset_of!(layer, nr_tasks) - 1463104usize];
["Offset of field: layer::load"][::std::mem::offset_of!(layer, load) - 1463112usize];
["Offset of field: layer::load_rd"][::std::mem::offset_of!(layer, load_rd) - 1463120usize];
["Offset of field: layer::cpus_seq"][::std::mem::offset_of!(layer, cpus_seq) - 1463152usize];
["Offset of field: layer::node_mask"][::std::mem::offset_of!(layer, node_mask) - 1463160usize];
["Offset of field: layer::llc_mask"][::std::mem::offset_of!(layer, llc_mask) - 1463168usize];
[::std::mem::offset_of!(layer, growth_algo) - 1463104usize];
["Offset of field: layer::owned_usage_target_ppk"]
[::std::mem::offset_of!(layer, owned_usage_target_ppk) - 1463108usize];
["Offset of field: layer::nr_tasks"][::std::mem::offset_of!(layer, nr_tasks) - 1463112usize];
["Offset of field: layer::cpus_seq"][::std::mem::offset_of!(layer, cpus_seq) - 1463120usize];
["Offset of field: layer::node_mask"][::std::mem::offset_of!(layer, node_mask) - 1463128usize];
["Offset of field: layer::llc_mask"][::std::mem::offset_of!(layer, llc_mask) - 1463136usize];
["Offset of field: layer::check_no_idle"]
[::std::mem::offset_of!(layer, check_no_idle) - 1463176usize];
[::std::mem::offset_of!(layer, check_no_idle) - 1463144usize];
["Offset of field: layer::refresh_cpus"]
[::std::mem::offset_of!(layer, refresh_cpus) - 1463184usize];
["Offset of field: layer::cpus"][::std::mem::offset_of!(layer, cpus) - 1463192usize];
["Offset of field: layer::nr_cpus"][::std::mem::offset_of!(layer, nr_cpus) - 1463256usize];
["Offset of field: layer::perf"][::std::mem::offset_of!(layer, perf) - 1463260usize];
["Offset of field: layer::name"][::std::mem::offset_of!(layer, name) - 1463264usize];
[::std::mem::offset_of!(layer, refresh_cpus) - 1463152usize];
["Offset of field: layer::cpus"][::std::mem::offset_of!(layer, cpus) - 1463160usize];
["Offset of field: layer::nr_cpus"][::std::mem::offset_of!(layer, nr_cpus) - 1463224usize];
["Offset of field: layer::perf"][::std::mem::offset_of!(layer, perf) - 1463228usize];
["Offset of field: layer::name"][::std::mem::offset_of!(layer, name) - 1463232usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
Expand Down

0 comments on commit aa519f5

Please sign in to comment.