Last active
May 26, 2020 14:25
-
-
Save alwaysR9/7dd302dcc7f26c8d2d2b4431dff8bff9 to your computer and use it in GitHub Desktop.
watch a var in linux kernel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env stap | |
probe kernel.statement("do_generic_file_read@mm/filemap.c:1772") { | |
printf("%s[%d] %s %ld:\n", execname(), tid(), pp(), $index); | |
} | |
probe kernel.function("submit_bio@block/blk-core.c") { | |
printf("%s[%d] %s i_sector:%lu, size:%u\n", execname(), tid(), pp(), $bio->bi_sector, $bio->bi_size); | |
} | |
>> stap -L 'kernel.function("finish_task_switch")' | |
<< kernel.function("finish_task_switch@kernel/sched/core.c:2376") $rq:struct rq* $prev:struct task_struct* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment