Is stack locking required?

I profiled my code with mutrace and had the following interesting / disturbing results:

Mutex #1260690 (0x0x7f87bc8eea40) first referenced by: /usr/lib/mutrace/libmutrace.so(pthread_mutex_lock+0x49) [0x7f87be0b76b9] /lib/x86_64-linux-gnu/libgcc_s.so.1(_Unwind_Find_FDE+0x26) [0x7f87bc6eb0e6] mutrace: Showing 10 most contended mutexes: Mutex # Locked Changed Cont. tot.Time[ms] avg.Time[ms] max.Time[ms] Flags 1260690 19066789 1509831 109753 3600.883 0.000 0.226 M-.--. 

It seems that _Unwind_Find_FDE has to deal with erasing the stack.

My application is very multi-threaded with fairly strict latency requirements, so I would like to fix this as quickly as possible. Are there any compiler or environment options that I can use to get rid of this function call without rewriting my code? We use exceptions for the flow control part (perhaps unreasonably), but it would be a lot of refactoring to fix this.

 g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2 
+6
source share
1 answer

Stop using exceptions if you need low latency.

-3
source

Source: https://habr.com/ru/post/976425/


All Articles