Project

General

Profile

Bug #23211

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

Added by Ron Rechenmacher 10 months ago. Updated 4 months ago.

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

100%

Estimated time:
Spent 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 10 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 10 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?

#3 Updated by Kyle Knoepfel 6 months ago

Ron, may we close this issue?

#4 Updated by Kyle Knoepfel 6 months ago

  • % Done changed from 0 to 100
  • Assignee set to Kyle Knoepfel
  • Status changed from Feedback to Resolved

The fix has been backported to the art-v2-develop branch in case a bug-fix release of art 2.13 is required.

Implemented with commit hep_concurrency:9f485fc.

#5 Updated by Kyle Knoepfel 4 months ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF