Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 883016 Details for
Bug 906368
Support sys-devel/dwz for debuginfo optimization
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
dedupdebug POC
dedupdebug.patch (text/plain), 2.63 KB, created by
YiFei Zhu
on 2024-01-24 06:28:44 UTC
(
hide
)
Description:
dedupdebug POC
Filename:
MIME Type:
Creator:
YiFei Zhu
Created:
2024-01-24 06:28:44 UTC
Size:
2.63 KB
patch
obsolete
>diff --git a/bin/estrip b/bin/estrip >index 3ac6a1692..2d9d50922 100755 >--- a/bin/estrip >+++ b/bin/estrip >@@ -15,8 +15,8 @@ exp_tf() { > eval ${var}_${flag}=$(tf has ${flag} ${!var}) > done > } >-exp_tf FEATURES compressdebug installsources nostrip splitdebug xattr >-exp_tf PORTAGE_RESTRICT binchecks installsources splitdebug strip >+exp_tf FEATURES compressdebug dedupdebug installsources nostrip splitdebug xattr >+exp_tf PORTAGE_RESTRICT binchecks dedupdebug installsources splitdebug strip > > if ! ___eapi_has_prefix_variables; then > EPREFIX= ED=${D} >@@ -201,6 +201,10 @@ fi > [[ ${debugedit} ]] && debugedit_found=true || debugedit_found=false > debugedit_warned=false > >+dwz=$(type -P dwz) >+[[ ${dwz} ]] && dwz_found=true || dwz_found=false >+dwz_warned=false >+ > __multijob_init > > # Setup ${T} filesystem layout that we care about. >@@ -248,6 +252,32 @@ __try_symlink() { > die "failed to create symlink '${name}'" > } > >+# Usage: dedup_elf_debug <src> <inode_dedupdebug> >+dedup_elf_debug() { >+ ${FEATURES_dedupdebug} || return 0 >+ ${PORTAGE_RESTRICT_dedupdebug} && return 0 >+ >+ debug-print-function "${FUNCNAME}" "$@" >+ >+ if ! ${dwz_found} ; then >+ if ! ${dwz_warned} ; then >+ dwz_warned=true >+ ewarn "FEATURES=dedupdebug is enabled but the dwz binary could not be" >+ ewarn "found. This feature will not work unless dwz is installed!" >+ fi >+ return 0 >+ fi >+ >+ local src=$1 # File to dedup debug symbols >+ local inode_dedupdebug=$2 # Temp path for hard link tracking >+ >+ # We already dedupdebug-ed this inode. >+ [[ -L ${inode_dedupdebug} ]] && return 0 >+ >+ "${dwz}" -- "${src}" >+ touch "${inode_dedupdebug}" >+} >+ > # Usage: save_elf_debug <src> <inode_debug> [splitdebug] > save_elf_debug() { > ${FEATURES_splitdebug} || return 0 >@@ -355,6 +385,7 @@ process_elf() { > xt_data=$(dump_xattrs "${x}") > fi > save_elf_sources "${x}" >+ dedup_elf_debug "${x}" "${inode_link}_dedupdebug" > fi > > if ${strip_this} ; then >diff --git a/lib/_emerge/EbuildPhase.py b/lib/_emerge/EbuildPhase.py >index c81bf54a8..3b366f39c 100644 >--- a/lib/_emerge/EbuildPhase.py >+++ b/lib/_emerge/EbuildPhase.py >@@ -67,6 +67,7 @@ class EbuildPhase(CompositeTask): > _features_display = ( > "ccache", > "compressdebug", >+ "dedupdebug", > "distcc", > "fakeroot", > "installsources", >diff --git a/lib/portage/const.py b/lib/portage/const.py >index 1f468a1ab..2154213b7 100644 >--- a/lib/portage/const.py >+++ b/lib/portage/const.py >@@ -176,6 +176,7 @@ SUPPORTED_FEATURES = frozenset( > "compressdebug", > "compress-index", > "config-protect-if-modified", >+ "dedupdebug", > "digest", > "distcc", > "distlocks",
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 906368
: 883016