Project

General

Profile

Bug #23211

costly getenv calls in RecursiveMutex::lock and RecursiveMutex::unlock

Added by Ron Rechenmacher 2 months ago. Updated 2 months ago.

Status:
Feedback
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
09/03/2019
Due date:
% Done:

0%

Estimated time:
Duration:

Description

These are effecting messagefacility efficiency/performance.

Samples: 316K of event 'cycles:u', Event count (approx.): 20319864624
Overhead Command Shared Object Symbol
8.32% mf_test libc-2.17.so [.] _mpn_divrem
6.69% mf_test libc-2.17.so [.] getenv
5.59% mf_test libc-2.17.so [.] __printf_fp
4.77% mf_test libc-2.17.so [.] __strncmp_sse2
4.39% mf_test libc-2.17.so [.] vfprintf
4.10% mf_test libc-2.17.so [.] __strftime_internal
3.05% mf_test libstdc++.so.6.0.22 [.] std::
_ostream_insert<char, std::char_traits<char> >
2.40% mf_test libc-2.17.so [.] __memcpy_ssse3_back
2.30% mf_test libc-2.17.so [.] hack_digit.13624
2.29% mf_test libc-2.17.so [.] _int_malloc
2.02% mf_test libc-2.17.so [.] _int_free
1.94% mf_test libstdc++.so.6.0.22 [.] __dynamic_cast
...

As an aside, TRACE seems tailor-made for this "if (getenv("ART_DEBUG_RECURSIVE_MUTEX") != nullptr)"
type of debugging.

History

#1 Updated by Kyle Knoepfel 2 months ago

  • Status changed from New to Accepted

We will investigate if there is a simple way to improve the efficiency.

#2 Updated by Kyle Knoepfel 2 months ago

  • Status changed from Accepted to Feedback

Ron, this appears to have been fixed for art 3.01 and newer. Which versions of art did you detect this inefficiency?



Also available in: Atom PDF