Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(540)

Issue 9778049: code review 9778049: runtime: introduce helper persistentalloc() function (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 1 month ago by dvyukov
Modified:
12 years, 1 month ago
Reviewers:
iant, khr1
CC:
golang-dev, khr1
Visibility:
Public.

Description

runtime: introduce helper persistentalloc() function It is a caching wrapper around SysAlloc() that can allocate small chunks. Use it for symtab allocations. Reduces number of symtab walks from 4 to 3 (reduces buildfuncs time from 10ms to 7.5ms on a large binary, reduces initial heap size by 680K on the same binary). Also can be used for type info allocation, itab allocation. There are also several places in GC where we do the same thing, they can be changed to use persistentalloc(). Also can be used in FixAlloc, because each instance of FixAlloc allocates in 128K regions, which is too eager. Reincarnation of committed and rolled back https://codereview.appspot.com/9805043 The latent bugs that it revealed are fixed: https://codereview.appspot.com/9837049 https://codereview.appspot.com/9778048

Patch Set 1 #

Patch Set 2 : diff -r 7e6f043f2000 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 3 : diff -r 8c800027d5a6 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 4 : diff -r 85353b4dc2d4 https://dvyukov%40google.com@code.google.com/p/go/ #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+55 lines, -25 lines) Patch
M src/pkg/runtime/malloc.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M src/pkg/runtime/malloc.goc View 1 2 3 1 chunk +47 lines, -0 lines 1 comment Download
M src/pkg/runtime/symtab.c View 1 2 6 chunks +7 lines, -25 lines 1 comment Download

Messages

Total messages: 6
dvyukov
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://dvyukov%40google.com@code.google.com/p/go/
12 years, 1 month ago (2013-05-30 17:32:04 UTC) #1
khr1
LGTM Do you have bug #s / CL #s for the latent bugs that were ...
12 years, 1 month ago (2013-05-30 19:48:16 UTC) #2
dvyukov
On 2013/05/30 19:48:16, khr1 wrote: > LGTM > > Do you have bug #s / ...
12 years, 1 month ago (2013-05-31 06:38:24 UTC) #3
dvyukov
*** Submitted as https://code.google.com/p/go/source/detail?r=2c4de577b1ae *** runtime: introduce helper persistentalloc() function It is a caching wrapper ...
12 years, 1 month ago (2013-05-31 06:43:04 UTC) #4
iant
https://codereview.appspot.com/9778049/diff/10001/src/pkg/runtime/malloc.goc File src/pkg/runtime/malloc.goc (right): https://codereview.appspot.com/9778049/diff/10001/src/pkg/runtime/malloc.goc#newcode523 src/pkg/runtime/malloc.goc:523: if(align) { Write if(align != 0) { or if(align ...
12 years, 1 month ago (2013-05-31 13:33:58 UTC) #5
dvyukov
12 years, 1 month ago (2013-06-01 21:35:30 UTC) #6
Sent https://codereview.appspot.com/9693044

On Fri, May 31, 2013 at 5:33 PM,  <iant@golang.org> wrote:
>
> https://codereview.appspot.com/9778049/diff/10001/src/pkg/runtime/malloc.goc
> File src/pkg/runtime/malloc.goc (right):
>
>
https://codereview.appspot.com/9778049/diff/10001/src/pkg/runtime/malloc.goc#...
> src/pkg/runtime/malloc.goc:523: if(align) {
> Write if(align != 0) { or if(align > 0) {
>
> https://codereview.appspot.com/9778049/diff/10001/src/pkg/runtime/symtab.c
> File src/pkg/runtime/symtab.c (right):
>
>
https://codereview.appspot.com/9778049/diff/10001/src/pkg/runtime/symtab.c#ne...
> src/pkg/runtime/symtab.c:566: // or also obtained from
> persistentmalloc().
> s/persistentmalloc/persistentalloc/
>
> https://codereview.appspot.com/9778049/
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b