/* taken from /sys/kernel/tracing/events/sched/sched_switch/format */ struct sched_switch_args { unsignedlonglong pad; char prev_comm[TASK_COMM_LEN]; int prev_pid; int prev_prio; longlong prev_state; char next_comm[TASK_COMM_LEN]; int next_pid; int next_prio;
};
value_p = bpf_map_lookup_elem(&control_map, &key); if (value_p && *value_p) return 0; /* skip if non-zero *value_p */
/* The size of stackmap and stackid_hmap should be the same */
key = bpf_get_stackid(ctx, &stackmap, 0); if ((int)key >= 0) {
bpf_map_update_elem(&stackid_hmap, &key, &val, 0);
stack_p = bpf_map_lookup_elem(&stack_amap, &key); if (stack_p)
bpf_get_stack(ctx, stack_p, max_len, 0);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.