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

Issue 127450044: code review 127450044: runtime: always pass type to mallocgc when allocating s... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 8 months ago by dvyukov
Modified:
10 years, 8 months ago
Reviewers:
khr
CC:
golang-codereviews, khr, rlh, rsc
Visibility:
Public.

Description

runtime: always pass type to mallocgc when allocating scannable memory We allocate scannable memory w/o type only in few places in runtime. All these cases are not-performance critical (e.g. G or finq args buffer), and in long term they all need to go away. It's not worth it to have special code for this case in mallocgc. So use special fake "notype" type for such allocations.

Patch Set 1 #

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

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

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

Total comments: 2

Patch Set 5 : diff -r b86ee06ef235d5766845f44056f152e1808da110 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 6 : diff -r 9a3b7b108ad33c1dc5f8386b79535c54f78fbb2e https://dvyukov%40google.com@code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+57 lines, -49 lines) Patch
M src/pkg/runtime/malloc.c View 1 4 chunks +9 lines, -0 lines 0 comments Download
M src/pkg/runtime/malloc.go View 1 2 3 4 5 1 chunk +39 lines, -49 lines 0 comments Download
M src/pkg/runtime/mgc0.go View 1 2 3 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 4
dvyukov
Hello golang-codereviews@googlegroups.com (cc: khr@golang.org, rlh@golang.org, rsc@golang.org), I'd like you to review this change to https://dvyukov%40google.com@code.google.com/p/go/
10 years, 8 months ago (2014-08-18 14:00:54 UTC) #1
dvyukov
https://codereview.appspot.com/127450044/diff/60001/src/pkg/runtime/malloc.go File src/pkg/runtime/malloc.go (left): https://codereview.appspot.com/127450044/diff/60001/src/pkg/runtime/malloc.go#oldcode237 src/pkg/runtime/malloc.go:237: if typ != nil && (uintptr(typ.gc[0])|uintptr(typ.gc[1])) != 0 && ...
10 years, 8 months ago (2014-08-18 14:01:02 UTC) #2
khr
LGTM.
10 years, 8 months ago (2014-08-18 20:40:33 UTC) #3
dvyukov
10 years, 8 months ago (2014-08-19 11:59:47 UTC) #4
*** Submitted as https://code.google.com/p/go/source/detail?r=6b52ebfb804e ***

runtime: always pass type to mallocgc when allocating scannable memory
We allocate scannable memory w/o type only in few places in runtime.
All these cases are not-performance critical (e.g. G or finq args buffer),
and in long term they all need to go away.
It's not worth it to have special code for this case in mallocgc.
So use special fake "notype" type for such allocations.

LGTM=khr
R=golang-codereviews, khr
CC=golang-codereviews, rlh, rsc
https://codereview.appspot.com/127450044
Sign in to reply to this message.

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