Bug 2218039

Summary: Performance issue in elf_getdata_rawchunk
Product: Red Hat Enterprise Linux 9 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, wcohen
Version: 9.3Keywords: Triaged
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: elfutils-0.189-3.el9 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 2218041 (view as bug list) 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:    
Bug Blocks: 2218041    

Description Mark Wielaard 2023-06-27 22:31:49 UTC
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