Always generate profiling debug info
The additional debug info is used for sampling PGO. This does not affect the size of final stripped binaries. Also removed `-gmlt` flag in pgo.go, since it's actually a lower level of debug option than the default (-g). Test: build, verify final binaries are identical size Bug: 79161490 Change-Id: Ie4cf4998695f78a50a7ac7a7a0853c625cbd8880
This commit is contained in:
parent
5f99726550
commit
110cd5fe7f
|
@ -46,6 +46,7 @@ var (
|
|||
|
||||
"-O2",
|
||||
"-g",
|
||||
"-fdebug-info-for-profiling",
|
||||
|
||||
"-fno-strict-aliasing",
|
||||
|
||||
|
|
|
@ -41,7 +41,6 @@ var (
|
|||
var pgoProfileProjectsConfigKey = android.NewOnceKey("PgoProfileProjects")
|
||||
|
||||
const profileInstrumentFlag = "-fprofile-generate=/data/local/tmp"
|
||||
const profileSamplingFlag = "-gmlt -fdebug-info-for-profiling"
|
||||
const profileUseInstrumentFormat = "-fprofile-use=%s"
|
||||
const profileUseSamplingFormat = "-fprofile-sample-accurate -fprofile-sample-use=%s"
|
||||
|
||||
|
@ -100,9 +99,6 @@ func (props *PgoProperties) addInstrumentationProfileGatherFlags(ctx ModuleConte
|
|||
}
|
||||
func (props *PgoProperties) addSamplingProfileGatherFlags(ctx ModuleContext, flags Flags) Flags {
|
||||
flags.Local.CFlags = append(flags.Local.CFlags, props.Pgo.Cflags...)
|
||||
|
||||
flags.Local.CFlags = append(flags.Local.CFlags, profileSamplingFlag)
|
||||
flags.Local.LdFlags = append(flags.Local.LdFlags, profileSamplingFlag)
|
||||
return flags
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue