aboutsummaryrefslogtreecommitdiffhomepage
path: root/builder/sizes.go
diff options
context:
space:
mode:
Diffstat (limited to 'builder/sizes.go')
-rw-r--r--builder/sizes.go11
1 files changed, 3 insertions, 8 deletions
diff --git a/builder/sizes.go b/builder/sizes.go
index e55970f24..dd2c5ccc9 100644
--- a/builder/sizes.go
+++ b/builder/sizes.go
@@ -118,10 +118,6 @@ var (
// pack: data created when storing a constant in an interface for example
// string: buffer behind strings
packageSymbolRegexp = regexp.MustCompile(`\$(alloc|embedfsfiles|embedfsslice|embedslice|pack|string)(\.[0-9]+)?$`)
-
- // Reflect sidetables. Created by the reflect lowering pass.
- // See src/reflect/sidetables.go.
- reflectDataRegexp = regexp.MustCompile(`^reflect\.[a-zA-Z]+Sidetable$`)
)
// readProgramSizeFromDWARF reads the source location for each line of code and
@@ -375,7 +371,7 @@ func loadProgramSize(path string, packagePathMap map[string]string) (*programSiz
if section.Flags&elf.SHF_ALLOC == 0 {
continue
}
- if packageSymbolRegexp.MatchString(symbol.Name) || reflectDataRegexp.MatchString(symbol.Name) {
+ if packageSymbolRegexp.MatchString(symbol.Name) {
addresses = append(addresses, addressLine{
Address: symbol.Value,
Length: symbol.Size,
@@ -836,9 +832,8 @@ func findPackagePath(path string, packagePathMap map[string]string) string {
} else if packageSymbolRegexp.MatchString(path) {
// Parse symbol names like main$alloc or runtime$string.
packagePath = path[:strings.LastIndex(path, "$")]
- } else if reflectDataRegexp.MatchString(path) {
- // Parse symbol names like reflect.structTypesSidetable.
- packagePath = "Go reflect data"
+ } else if path == "<Go type>" {
+ packagePath = "Go types"
} else if path == "<Go interface assert>" {
// Interface type assert, generated by the interface lowering pass.
packagePath = "Go interface assert"