Procházet zdrojové kódy

Get rid of newlines at the end of function names from nm symbolization

They were thrashing pprof's output
Raul Silvera před 9 roky
rodič
revize
ab2ad3d69d
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2
    1
      internal/binutils/addr2liner_nm.go

+ 2
- 1
internal/binutils/addr2liner_nm.go Zobrazit soubor

@@ -61,7 +61,7 @@ func newAddr2LinerNM(cmd, file string, base uint64) (*addr2LinerNM, error) {
61 61
 		return nil, err
62 62
 	}
63 63
 
64
-	// Parse addr2line output and populate symbol map.
64
+	// Parse nm output and populate symbol map.
65 65
 	// Skip lines we fail to parse.
66 66
 	buf := bufio.NewReader(&b)
67 67
 	for {
@@ -72,6 +72,7 @@ func newAddr2LinerNM(cmd, file string, base uint64) (*addr2LinerNM, error) {
72 72
 			}
73 73
 			return nil, err
74 74
 		}
75
+		line = strings.TrimSpace(line)
75 76
 		fields := strings.SplitN(line, " ", 3)
76 77
 		if len(fields) != 3 {
77 78
 			continue