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

Issue 9776043: code review 9776043: runtime: speedup malloc stats collection (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 12 months ago by dvyukov
Modified:
10 years, 11 months ago
Reviewers:
rsc
CC:
golang-dev, dave_cheney.net, rsc
Visibility:
Public.

Description

runtime: speedup malloc stats collection Count only number of frees, everything else is derivable and does not need to be counted on every malloc. benchmark old ns/op new ns/op delta BenchmarkMalloc8 68 66 -3.07% BenchmarkMalloc16 75 70 -6.48% BenchmarkMallocTypeInfo8 102 97 -4.80% BenchmarkMallocTypeInfo16 108 105 -2.78%

Patch Set 1 #

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

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

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

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

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

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

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

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

Patch Set 10 : diff -r 60e04bb0d8b9 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 11 : diff -r 60e04bb0d8b9 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 12 : diff -r 60e04bb0d8b9 https://dvyukov%40google.com@code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+108 lines, -67 lines) Patch
M src/pkg/runtime/malloc.h View 1 2 3 4 5 6 7 8 9 2 chunks +11 lines, -13 lines 0 comments Download
M src/pkg/runtime/malloc.goc View 1 2 3 4 5 6 7 8 9 6 chunks +12 lines, -32 lines 0 comments Download
M src/pkg/runtime/mcache.c View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -1 line 0 comments Download
M src/pkg/runtime/mgc0.c View 1 2 3 4 5 6 7 8 9 8 chunks +85 lines, -21 lines 0 comments Download

Messages

Total messages: 7
dvyukov
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://dvyukov%40google.com@code.google.com/p/go/
10 years, 12 months ago (2013-05-26 16:01:33 UTC) #1
dvyukov
I've also compared memstats on test/bench/garbage/parser benchmark by hand, and they look sane (there is ...
10 years, 12 months ago (2013-05-26 16:05:01 UTC) #2
dave_cheney.net
linux/arm pandaboard alarm(~/go/src/pkg/runtime) % ~/go/misc/benchcmp {old,new}.txt benchmark old ns/op new ns/op delta BenchmarkMalloc8 485 452 ...
10 years, 11 months ago (2013-05-27 12:47:42 UTC) #3
dave_cheney.net
That should read, 9790043, but you probably knew that. On Mon, May 27, 2013 at ...
10 years, 11 months ago (2013-05-27 12:48:14 UTC) #4
dave_cheney.net
ping.
10 years, 11 months ago (2013-06-02 01:56:02 UTC) #5
rsc
LGTM It seems unfortunate that ReadMemStats now flushes the allocation caches, but I guess it's ...
10 years, 11 months ago (2013-06-04 01:18:32 UTC) #6
dvyukov
10 years, 11 months ago (2013-06-06 10:56:58 UTC) #7
*** Submitted as https://code.google.com/p/go/source/detail?r=b1217a6ca24c ***

runtime: speedup malloc stats collection
Count only number of frees, everything else is derivable
and does not need to be counted on every malloc.
benchmark                    old ns/op    new ns/op    delta
BenchmarkMalloc8                    68           66   -3.07%
BenchmarkMalloc16                   75           70   -6.48%
BenchmarkMallocTypeInfo8           102           97   -4.80%
BenchmarkMallocTypeInfo16          108          105   -2.78%

R=golang-dev, dave, rsc
CC=golang-dev
https://codereview.appspot.com/9776043
Sign in to reply to this message.

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