staticint stack_check_outer_callback(void *ctx)
{ int a = map1_lookup_elem(1); int b = map1_lookup_elem(2); int c = map1_lookup_elem(3); int d = map1_lookup_elem(4); int e = map1_lookup_elem(5); int f = map1_lookup_elem(6);
bpf_loop(1, stack_check_inner_callback, NULL, 0);
map1_update_elem(1, a + 1);
map1_update_elem(2, b + 1);
map1_update_elem(3, c + 1);
map1_update_elem(4, d + 1);
map1_update_elem(5, e + 1);
map1_update_elem(6, f + 1);
return0;
}
/* Some of the local variables in stack_check and *stack_check_outer_callbackwouldbeallocatedonstackby *compiler.Thistestshouldverifythatstackcontentforthese *variablesispreservedbetweencallstobpf_loop(mightbeanissue *ifloopinliningallocatesstackslotsincorrectly).
*/
SEC("fentry/" SYS_PREFIX "sys_nanosleep") int stack_check(void *ctx)
{ if (bpf_get_current_pid_tgid() >> 32 != pid) return0;
int a = map1_lookup_elem(7); int b = map1_lookup_elem(8); int c = map1_lookup_elem(9); int d = map1_lookup_elem(10); int e = map1_lookup_elem(11); int f = map1_lookup_elem(12);
bpf_loop(1, stack_check_outer_callback, NULL, 0);
map1_update_elem(7, a + 1);
map1_update_elem(8, b + 1);
map1_update_elem(9, c + 1);
map1_update_elem(10, d + 1);
map1_update_elem(11, e + 1);
map1_update_elem(12, f + 1);
return0;
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.8 Sekunden
(vorverarbeitet am 2026-10-11)
¤
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.