Arguments

The arguments to profile probes are as follows:

arg0

The program counter (PC) in the kernel at the time that the probe fired, or 0 if the current process was not executing in the kernel at the time that the probe fired

arg1

The PC in the user-level process at the time that the probe fired, or 0 if the current process was executing at the kernel at the time that the probe fired

As the descriptions imply, if arg0 is non-zero then arg1 is zero; if arg0 is zero then arg1 is non-zero. Thus, you can use arg0 and arg1 to differentiate user-level from kernel level, as in this simple example:

profile-1ms
{
	@ticks[arg0 ? "kernel" : "user"] = count();
}

相关文章:

  • 2022-12-23
  • 2021-05-29
  • 2021-08-21
  • 2021-11-10
  • 2022-01-04
  • 2021-10-06
  • 2022-12-23
猜你喜欢
  • 2021-07-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-09
  • 2022-12-23
  • 2021-10-29
相关资源
相似解决方案