1
0
mirror of https://github.com/golang/go synced 2024-11-18 22:55:23 -07:00

runtime: remove holes in FUNCDATA tables

Shrinks the text segment size by about 1.5% for the "go", "gofmt",
and "camlistored" commands on linux/amd64.

Before:
$ size go gofmt camlistored
   text	   data	    bss	    dec	    hex	filename
6506842	 136996	 105784	6749622	 66fdb6	go
2376046	  85232	  90984	2552262	 26f1c6	gofmt
17051050	 190256	 130320	17371626	10911ea	camlistored

After:
$ size go gofmt camlistored
   text	   data	    bss	    dec	    hex	filename
6403034	 136996	 105784	6645814	 656836	go
2331118	  85232	  90984	2507334	 264246	gofmt
16842586	 190256	 130320	17163162	105e39a	camlistored

Fixes #8604.

LGTM=rsc
R=golang-codereviews, bradfitz, rsc
CC=golang-codereviews
https://golang.org/cl/137790043
This commit is contained in:
Matthew Dempsky 2014-08-28 19:08:09 -07:00 committed by Ian Lance Taylor
parent b3de7f28a8
commit 3d128dbf96

View File

@ -10,9 +10,9 @@
#define PCDATA_ArgSize 0 /* argument size at CALL instruction */
#define PCDATA_StackMapIndex 1
#define FUNCDATA_ArgsPointerMaps 2 /* garbage collector blocks */
#define FUNCDATA_LocalsPointerMaps 3
#define FUNCDATA_DeadValueMaps 4
#define FUNCDATA_ArgsPointerMaps 0 /* garbage collector blocks */
#define FUNCDATA_LocalsPointerMaps 1
#define FUNCDATA_DeadValueMaps 2
// To be used in assembly.
#define ARGSIZE(n) PCDATA $PCDATA_ArgSize, $n
@ -27,9 +27,9 @@
enum {
PCDATA_ArgSize = 0,
PCDATA_StackMapIndex = 1,
FUNCDATA_ArgsPointerMaps = 2,
FUNCDATA_LocalsPointerMaps = 3,
FUNCDATA_DeadValueMaps = 4,
FUNCDATA_ArgsPointerMaps = 0,
FUNCDATA_LocalsPointerMaps = 1,
FUNCDATA_DeadValueMaps = 2,
ArgsSizeUnknown = 0x80000000,
};
*/