Function caller in linux kernel

前端 未结 4 1632
深忆病人
深忆病人 2021-01-30 03:26

Is there a way to get function caller in linux kernel? I know __func__ returns the function name which is executing. I am looking for the function whic

4条回答
  •  無奈伤痛
    2021-01-30 04:03

    To get the caller function name, one can use the below printk command.

    printk("Caller is %pF\n", __builtin_return_address(0));

提交回复
热议问题