• Robert Griesemer's avatar
    cmd/compile: first cut at exporting position info · 5c593a32
    Robert Griesemer authored
    - position info for all exported globals, plus methods and fields
    - use delta-encoded line number info in most cases
    - canonicalize all strings: each filename appears only once,
      but will also compact other strings (names) to at most one
      occurence in encoding
    - positions not yet hooked up when reading in
    
    Also:
    - adjusted go/importer (gcimporter)
    - some refactoring for better symmetry
    
    Stats:
    - comparison of export data size w/o and w/ position info (bytes).
    - delta is increase in %
    - overall (see bottom of table): 14% increase
    - however, the current binary format decreased from
      the original binary format last week by 14%
    - compared to original textual format: 65% decrease
      (increase by 14% after decrease by 14% still leads
      to a decrease from original textual format)
    
    (caveat: we used the textual size from last week, assuming
    it has not changed - there may be a small error here).
    
    package				w/o pos	w/ pos	delta
    
    archive/tar			4234	4902	16%
    archive/zip			6387	7340	15%
    bufio				3106	3419	10%
    bytes				4362	4757	9%
    cmd/addr2line			27	70	159%
    cmd/api				12065	13590	13%
    cmd/asm				27	64	137%
    cmd/asm/internal/arch		9957	11529	16%
    cmd/asm/internal/asm		11788	13385	14%
    cmd/asm/internal/flags		239	311	30%
    cmd/asm/internal/lex		13415	15358	14%
    cmd/cgo				13064	15006	15%
    cmd/compile			27	67	148%
    cmd/compile/internal/amd64	461	869	89%
    cmd/compile/internal/arm	5963	7273	22%
    cmd/compile/internal/arm64	363	657	81%
    cmd/compile/internal/big	7186	8590	20%
    cmd/compile/internal/gc		48242	56234	17%
    cmd/compile/internal/mips64	367	666	81%
    cmd/compile/internal/ppc64	372	721	94%
    cmd/compile/internal/s390x	330	569	72%
    cmd/compile/internal/ssa	30464	35058	15%
    cmd/compile/internal/x86	429	770	79%
    cmd/cover			3984	4731	19%
    cmd/dist			74	154	108%
    cmd/doc				7272	8591	18%
    cmd/expdump			27	71	163%
    cmd/fix				342	419	23%
    cmd/go				8126	9520	17%
    cmd/gofmt			27	70	159%
    cmd/gofmt2			27	69	156%
    cmd/gofmt2/internal/format	702	856	22%
    cmd/gofmt2/internal/lexical	2954	3509	19%
    cmd/gofmt2/internal/parse	6185	7295	18%
    cmd/gofmt2/internal/syntax	3533	4738	34%
    cmd/gofmt2/internal/test	540	615	14%
    cmd/internal/bio		5395	6060	12%
    cmd/internal/gcprog		533	663	24%
    cmd/internal/goobj		1022	1277	25%
    cmd/internal/obj		10951	12825	17%
    cmd/internal/obj/arm		8612	9985	16%
    cmd/internal/obj/arm64		15814	17638	12%
    cmd/internal/obj/mips		10928	12487	14%
    cmd/internal/obj/ppc64		13576	15277	13%
    cmd/internal/obj/s390x		16513	18708	13%
    cmd/internal/obj/x86		21152	23482	11%
    cmd/internal/objfile		14442	16505	14%
    cmd/internal/pprof/commands	1663	1885	13%
    cmd/internal/pprof/driver	9517	10789	13%
    cmd/internal/pprof/fetch	7632	8635	13%
    cmd/internal/pprof/plugin	13150	14809	13%
    cmd/internal/pprof/profile	7004	8248	18%
    cmd/internal/pprof/report	7763	8942	15%
    cmd/internal/pprof/svg		1332	1534	15%
    cmd/internal/pprof/symbolizer	7376	8439	14%
    cmd/internal/pprof/symbolz	6970	7976	14%
    cmd/internal/pprof/tempfile	3645	4093	12%
    cmd/internal/sys		505	619	23%
    cmd/internal/unvendor/golang.org/x/arch/arm/armasm	73951	79188	7%
    cmd/internal/unvendor/golang.org/x/arch/x86/x86asm	10140	11738	16%
    cmd/link			27	64	137%
    cmd/link/internal/amd64		9317	11034	18%
    cmd/link/internal/arm		110	213	94%
    cmd/link/internal/arm64		112	219	96%
    cmd/link/internal/ld		53524	60149	12%
    cmd/link/internal/mips64	113	222	96%
    cmd/link/internal/ppc64		113	220	95%
    cmd/link/internal/s390x		112	219	96%
    cmd/link/internal/x86		110	212	93%
    cmd/nm				27	61	126%
    cmd/objdump			27	68	152%
    cmd/pack			4141	4688	13%
    cmd/pprof			27	67	148%
    cmd/trace			624	842	35%
    cmd/vet				11194	13140	17%
    cmd/vet/internal/whitelist	52	113	117%
    cmd/yacc			1141	1317	15%
    compress/bzip2			2101	2484	18%
    compress/flate			3619	4336	20%
    compress/gzip			6261	7111	14%
    compress/lzw			276	401	45%
    compress/zlib			3630	4158	15%
    container/heap			187	250	34%
    container/list			1370	1506	10%
    container/ring			466	546	17%
    context				3005	3338	11%
    crypto				728	856	18%
    crypto/aes			181	321	77%
    crypto/cipher			744	1163	56%
    crypto/des			220	320	45%
    crypto/dsa			4526	4990	10%
    crypto/ecdsa			5341	5982	12%
    crypto/elliptic			4969	5593	13%
    crypto/hmac			188	250	33%
    crypto/md5			560	706	26%
    crypto/rand			4218	4746	13%
    crypto/rc4			214	321	50%
    crypto/rsa			5648	6355	13%
    crypto/sha1			597	751	26%
    crypto/sha256			228	351	54%
    crypto/sha512			354	484	37%
    crypto/subtle			586	621	6%
    crypto/tls			20909	23438	12%
    crypto/x509			14862	16857	13%
    crypto/x509/pkix		8384	9278	11%
    database/sql			6721	7715	15%
    database/sql/driver		1243	1535	23%
    debug/dwarf			7867	9153	16%
    debug/elf			25479	28025	10%
    debug/gosym			1887	2267	20%
    debug/macho			7222	8846	22%
    debug/pe			6921	8081	17%
    debug/plan9obj			1084	1319	22%
    encoding			217	280	29%
    encoding/ascii85		587	722	23%
    encoding/asn1			1043	1268	22%
    encoding/base32			929	1112	20%
    encoding/base64			1166	1368	17%
    encoding/binary			2168	2410	11%
    encoding/csv			3761	4203	12%
    encoding/gob			11304	12936	14%
    encoding/hex			510	606	19%
    encoding/json			9965	11395	14%
    encoding/pem			202	266	32%
    encoding/xml			11817	13361	13%
    errors				126	170	35%
    expvar				930	1142	23%
    flag				5905	6519	10%
    fmt				1027	1190	16%
    go/ast				12910	15541	20%
    go/build			5460	6173	13%
    go/constant			1645	1816	10%
    go/doc				3107	3882	25%
    go/format			1416	1729	22%
    go/importer			1426	1668	17%
    go/internal/gccgoimporter	1624	2028	25%
    go/internal/gcimporter		2650	3095	17%
    go/parser			6220	7073	14%
    go/printer			1924	2306	20%
    go/scanner			3137	3602	15%
    go/token			3053	3474	14%
    go/types			21793	25561	17%
    hash				234	327	40%
    hash/adler32			465	553	19%
    hash/crc32			668	817	22%
    hash/crc64			630	727	15%
    hash/fnv			1413	1582	12%
    html				76	114	50%
    html/template			14382	16457	14%
    image				10248	11409	11%
    image/color			2247	2562	14%
    image/color/palette		107	169	58%
    image/draw			2313	2494	8%
    image/gif			3079	3450	12%
    image/internal/imageutil	3136	3456	10%
    image/jpeg			2349	2735	16%
    image/png			2404	2695	12%
    index/suffixarray		4978	5596	12%
    internal/race			225	278	24%
    internal/singleflight		551	697	26%
    internal/syscall/windows/sysdll	97	166	71%
    internal/testenv		4488	5052	13%
    internal/trace			1392	1680	21%
    io				2811	3318	18%
    io/ioutil			3988	4467	12%
    log				3532	3907	11%
    log/syslog			4247	4775	12%
    math				3021	4499	49%
    math/big			7250	8456	17%
    math/cmplx			1034	1617	56%
    math/rand			734	885	21%
    mime				1889	2194	16%
    mime/multipart			4313	4849	12%
    mime/quotedprintable		1758	1996	14%
    net				15686	18617	19%
    net/http			42182	47848	13%
    net/http/cgi			19496	21768	12%
    net/http/cookiejar		4615	5248	14%
    net/http/fcgi			17758	19771	11%
    net/http/httptest		26108	29350	12%
    net/http/httputil		20732	23286	12%
    net/http/internal		2195	2497	14%
    net/http/pprof			17596	19545	11%
    net/internal/socktest		1689	2153	27%
    net/mail			4328	4810	11%
    net/rpc				24328	27249	12%
    net/rpc/jsonrpc			11052	12438	13%
    net/smtp			17127	19174	12%
    net/textproto			3705	4329	17%
    net/url				1193	1371	15%
    os				8493	10113	19%
    os/exec				6625	7532	14%
    os/signal			137	236	72%
    os/user				529	761	44%
    path				295	372	26%
    path/filepath			3452	3952	14%
    reflect				5091	6028	18%
    regexp				4848	5585	15%
    regexp/syntax			2590	3076	19%
    runtime				8721	11598	33%
    runtime/cgo			17	17	0%
    runtime/debug			2721	3130	15%
    runtime/internal/atomic		569	704	24%
    runtime/internal/sys		1874	2318	24%
    runtime/pprof			478	582	22%
    runtime/race			18	18	0%
    runtime/trace			95	146	54%
    sort				1052	1215	15%
    strconv				1389	1667	20%
    strings				3372	3772	12%
    sync				946	1371	45%
    sync/atomic			962	1079	12%
    syscall				41574	45613	10%
    testing				6184	7243	17%
    testing/iotest			883	1116	26%
    testing/quick			4659	5443	17%
    text/scanner			2930	3269	12%
    text/tabwriter			2333	2607	12%
    text/template			13335	15274	15%
    text/template/parse		8270	9285	12%
    time				4687	5313	13%
    unicode				3831	4355	14%
    unicode/utf16			530	584	10%
    unicode/utf8			872	946	8%
    vendor/golang.org/x/net/http2/hpack	3386	3970	17%
    
    				1295440	1481566	14%
    orig. textual			4253585	1481566	-65%
    orig. binary			1724071	1481566 -14%
    
    Change-Id: I4177c6511cc57ebe5eb80c89bf3aefc83376ce86
    Reviewed-on: https://go-review.googlesource.com/22096Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
    5c593a32
Name
Last commit
Last update
..
addr2line Loading commit data...
api Loading commit data...
asm Loading commit data...
cgo Loading commit data...
compile Loading commit data...
cover Loading commit data...
dist Loading commit data...
doc Loading commit data...
fix Loading commit data...
go Loading commit data...
gofmt Loading commit data...
internal Loading commit data...
link Loading commit data...
nm Loading commit data...
objdump Loading commit data...
pack Loading commit data...
pprof Loading commit data...
trace Loading commit data...
vet Loading commit data...
yacc Loading commit data...