Bug 2218041

Summary: Performance issue in elf_getdata_rawchunk
Product: Red Hat Enterprise Linux 8 Reporter: Mark Wielaard <mjw>
Component: elfutilsAssignee: Mark Wielaard <mjw>
elfutils sub component: system-version QA Contact: Martin Cermak <mcermak>
Status: VERIFIED --- Docs Contact:
Severity: unspecified    
Priority: unspecified CC: mcermak, mjw, qe-baseos-tools-bugs, wcohen
Version: 8.9Keywords: Triaged
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: elfutils-0.189-3.el8 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: 2218039 Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2218039    
Bug Blocks:    

Description Mark Wielaard 2023-06-27 22:45:40 UTC
+++ This bug was initially created as a clone of Bug #2218039 +++

There is a linear search in elf_getdata_rawchunk which can impact reading of core files with many segments. See https://bugzilla.redhat.com/show_bug.cgi?id=2215412

The fix turns the linear search list O(n) into a binary search tree O(log n)
https://sourceware.org/cgit/elfutils/commit/?id=35e059b654224b1a01d05877b13582c74c692388