Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

system_call_after_swapgs, where is my code spending most of the time?

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

like image 373
Manfredo Avatar asked Oct 23 '25 03:10

Manfredo


1 Answers

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.

like image 123
izard Avatar answered Oct 25 '25 19:10

izard



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!