internal/gosym: preallocate inlined call slice

LineTable.InlineTree allocates a slice whose length is known in advance.
Preallocate it to avoid reallocations.

Change-Id: I1939f6d4e956ccb5d2b68e10695622784d8ced38
Reviewed-on: https://go-review.googlesource.com/c/vuln/+/581135
Run-TryBot: Quim Muntal <quimmuntal@gmail.com>
Reviewed-by: Joedian Reid <joedian@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Quim Muntal <quimmuntal@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Zvonimir Pavlinovic <zpavlinovic@google.com>
diff --git a/internal/gosym/additions.go b/internal/gosym/additions.go
index 4c41f55..022cf92 100644
--- a/internal/gosym/additions.go
+++ b/internal/gosym/additions.go
@@ -60,7 +60,7 @@
 	}
 
 	r := io.NewSectionReader(progReader, offset, 1<<32) // pick a size larger than we need
-	var ics []InlinedCall
+	ics := make([]InlinedCall, 0, f.inlineTreeCount)
 	for i := 0; i < f.inlineTreeCount; i++ {
 		if t.version >= ver120 {
 			var ric rawInlinedCall120