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

Side by Side Diff: src/heap/heap.cc

Issue 1553523002: [telemetry] Counter Cleanups (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix merge conflicts Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/counters.h ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/heap/heap.h" 5 #include "src/heap/heap.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/ast/scopeinfo.h" 9 #include "src/ast/scopeinfo.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 2083 matching lines...) Expand 10 before | Expand all | Expand 10 after
2094 } 2094 }
2095 2095
2096 2096
2097 AllocationResult Heap::AllocateMap(InstanceType instance_type, 2097 AllocationResult Heap::AllocateMap(InstanceType instance_type,
2098 int instance_size, 2098 int instance_size,
2099 ElementsKind elements_kind) { 2099 ElementsKind elements_kind) {
2100 HeapObject* result = nullptr; 2100 HeapObject* result = nullptr;
2101 AllocationResult allocation = AllocateRaw(Map::kSize, MAP_SPACE); 2101 AllocationResult allocation = AllocateRaw(Map::kSize, MAP_SPACE);
2102 if (!allocation.To(&result)) return allocation; 2102 if (!allocation.To(&result)) return allocation;
2103 2103
2104 isolate()->counters()->maps_created()->Increment();
2104 result->set_map_no_write_barrier(meta_map()); 2105 result->set_map_no_write_barrier(meta_map());
2105 Map* map = Map::cast(result); 2106 Map* map = Map::cast(result);
2106 map->set_instance_type(instance_type); 2107 map->set_instance_type(instance_type);
2107 map->set_prototype(null_value(), SKIP_WRITE_BARRIER); 2108 map->set_prototype(null_value(), SKIP_WRITE_BARRIER);
2108 map->set_constructor_or_backpointer(null_value(), SKIP_WRITE_BARRIER); 2109 map->set_constructor_or_backpointer(null_value(), SKIP_WRITE_BARRIER);
2109 map->set_instance_size(instance_size); 2110 map->set_instance_size(instance_size);
2110 map->clear_unused(); 2111 map->clear_unused();
2111 map->set_inobject_properties_or_constructor_function_index(0); 2112 map->set_inobject_properties_or_constructor_function_index(0);
2112 map->set_code_cache(empty_fixed_array(), SKIP_WRITE_BARRIER); 2113 map->set_code_cache(empty_fixed_array(), SKIP_WRITE_BARRIER);
2113 map->set_dependent_code(DependentCode::cast(empty_fixed_array()), 2114 map->set_dependent_code(DependentCode::cast(empty_fixed_array()),
(...skipping 4108 matching lines...) Expand 10 before | Expand all | Expand 10 after
6222 } 6223 }
6223 6224
6224 6225
6225 // static 6226 // static
6226 int Heap::GetStaticVisitorIdForMap(Map* map) { 6227 int Heap::GetStaticVisitorIdForMap(Map* map) {
6227 return StaticVisitorBase::GetVisitorId(map); 6228 return StaticVisitorBase::GetVisitorId(map);
6228 } 6229 }
6229 6230
6230 } // namespace internal 6231 } // namespace internal
6231 } // namespace v8 6232 } // namespace v8
OLDNEW
« no previous file with comments | « src/counters.h ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698