Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 928342 - app-shells/bash: About a PGO cleanup commit
Summary: app-shells/bash: About a PGO cleanup commit
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: NeedPatch
Depends on:
Blocks:
 
Reported: 2024-04-01 05:30 UTC by konsolebox
Modified: 2024-04-01 05:50 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description konsolebox 2024-04-01 05:30:01 UTC
https://gitweb.gentoo.org/repo/gentoo.git/commit/app-shells/bash?id=1d98516e65fb3dc0f1e0effc851216e1b827b9d4

Just two minor things I saw here:

1) `$(test-flags-CC -fprofile-partial-training)` is unecessarily called when pgo USE flag is not enabled.
2) Addition of -fprofile-update=atomic is undocumented.

In general I think the code shouldn't have been simplified to no two separate conditional blocks.  The use of two variables was ok but the pgo logic should have stayed encapsulated, along with the two variables.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-04-01 05:32:26 UTC
(In reply to konsolebox from comment #0)
> https://gitweb.gentoo.org/repo/gentoo.git/commit/app-shells/
> bash?id=1d98516e65fb3dc0f1e0effc851216e1b827b9d4
> 
> Just two minor things I saw here:
> 
> 1) `$(test-flags-CC -fprofile-partial-training)` is unecessarily called when
> pgo USE flag is not enabled.

meh.

> 2) Addition of -fprofile-update=atomic is undocumented.
> 

It's done to avoid multiple processes using bash clobbering it, or for threaded applications, I can't remember which. Not really sure it's a problem, is it?

> In general I think the code shouldn't have been simplified to no two
> separate conditional blocks.  The use of two variables was ok but the pgo
> logic should have stayed encapsulated, along with the two variables.

I guess?

I would review a patch but not really sure this is worth filing a bug other otherwise.
Comment 2 konsolebox 2024-04-01 05:46:42 UTC
(In reply to Sam James from comment #1)
> I would review a patch but not really sure this is worth filing a bug other
> otherwise.

I thought about giving an example code which I know later would be asked to be in a form of a patch but it's not worth the commit requirements.

Indeed these are just minor things but still I think it was worth informing and being "documented" in a form of this post.  I'll never know what devs would decide about it.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-04-01 05:50:49 UTC
OK.