Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Issue 202018: Heap profiler: account primitive string objects as being constructed using 'String'. (Closed)

Created:
11 years, 3 months ago by mnaganov (inactive)
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Heap profiler: account primitive string objects as being constructed using 'String'. Also: - move constructor name getter near similar class name getter method; - if the constructor is not present, use 'Object', as for class name, this eliminates a special case. Committed: http://code.google.com/p/v8/source/detail?r=2859

Patch Set 1 #

Total comments: 8

Patch Set 2 : Fixed comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -24 lines) Patch
M src/heap.cc View 1 3 chunks +21 lines, -20 lines 0 comments Download
M src/log.cc View 1 chunk +1 line, -3 lines 0 comments Download
M src/objects.h View 1 chunk +4 lines, -0 lines 0 comments Download
M src/objects.cc View 1 2 chunks +17 lines, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
mnaganov (inactive)
11 years, 3 months ago (2009-09-09 09:26:10 UTC) #1
Søren Thygesen Gjesse
LGTM with comments. http://codereview.chromium.org/202018/diff/1/2 File src/heap.cc (right): http://codereview.chromium.org/202018/diff/1/2#newcode3607 Line 3607: String* constructor_func = NULL; constructor_func ...
11 years, 3 months ago (2009-09-09 11:31:37 UTC) #2
mnaganov (inactive)
11 years, 3 months ago (2009-09-09 11:38:08 UTC) #3
Thanks!

http://codereview.chromium.org/202018/diff/1/2
File src/heap.cc (right):

http://codereview.chromium.org/202018/diff/1/2#newcode3607
Line 3607: String* constructor_func = NULL;
On 2009/09/09 11:31:37, Søren Gjesse wrote:
> constructor_func -> constructor_name?

'constructor' is enough. Fixed.

http://codereview.chromium.org/202018/diff/1/2#newcode3608
Line 3608: int size = obj->Size();
On 2009/09/09 11:31:37, Søren Gjesse wrote:
> Move size = obj->Size() to the first if part as this is where it actually
> counts.

Done.

http://codereview.chromium.org/202018/diff/1/2#newcode3610
Line 3610: constructor_func = Heap::String_symbol();
On 2009/09/09 11:31:37, Søren Gjesse wrote:
> Using obj->Size() for strings is to simple in many cases, but we can iterate
> over that. Also maybe we should do something special for external strings.

Right now it resembles HeapProfiler::CollectStats used for calculation of
internal types statistics. Yes, I think there is a room for improvement.

http://codereview.chromium.org/202018/diff/1/4
File src/objects.cc (right):

http://codereview.chromium.org/202018/diff/1/4#newcode1200
Line 1200: if (IsJSFunction()) return Heap::function_class_symbol();
On 2009/09/09 11:31:37, Søren Gjesse wrote:
> Please place this return on a separate line and add {}'s.

Done. Also for the 'class_name' method above.

Powered by Google App Engine
This is Rietveld 408576698