4

I am trying to profile my code with intel Vtune. When looking at the function call stack it looks like most of the time is spent on a function called system_call_after_swapgs. However there is no stack information. My question is: what is system_call_after_swapgs? And how do I know where it was called from?

enter image description here

Manfredo
  • 1,760
  • 4
  • 25
  • 53

1 Answers1

3

I also see that sysret_check is very high. I bet if you run general exploration, then extend frontend bound/frontend latency, you'll see high % of branch resteers. If so, this is likely a performance side effects of u-code patches against Spectre attacks, that clear BTB on system calls/returns to user mode.

If this system is air-gapped, or you have other good protection measures against attacks gaining local shell, you could revert BIOS to pre-2018 versions that do not include the u-code patch.

izard
  • 56
  • 1
  • 5
  • This comment is the closest I can find to what `sysret_check` IS. Can you expand this answer at all, perhaps with references? – jwm Jun 04 '21 at 23:58