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

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

Issue 1113233002: Adding api to get last gc object statistics for chrome://tracing. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixing api name and rebase Created 5 years, 7 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
« include/v8.h ('K') | « src/heap/heap.h ('k') | no next file » | 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/v8.h" 5 #include "src/v8.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/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/once.h" 10 #include "src/base/once.h"
(...skipping 6483 matching lines...) Expand 10 before | Expand all | Expand 10 after
6494 } else { 6494 } else {
6495 strong_roots_list_ = next; 6495 strong_roots_list_ = next;
6496 } 6496 }
6497 delete list; 6497 delete list;
6498 } else { 6498 } else {
6499 prev = list; 6499 prev = list;
6500 } 6500 }
6501 list = next; 6501 list = next;
6502 } 6502 }
6503 } 6503 }
6504
6505
6506 const char* Heap::GetObjectTypeName(size_t index) {
6507 if (index >= OBJECT_STATS_COUNT) return nullptr;
6508
6509 switch (static_cast<int>(index)) {
6510 #define COMPARE_AND_RETURN_NAME(name) \
6511 case name: \
6512 return #name;
6513 INSTANCE_TYPE_LIST(COMPARE_AND_RETURN_NAME)
6514 #undef COMPARE_AND_RETURN_NAME
6515 #define COMPARE_AND_RETURN_NAME(name) \
6516 case FIRST_CODE_KIND_SUB_TYPE + Code::name: \
6517 return "CODE_TYPE/CODE_KIND/" #name;
6518 CODE_KIND_LIST(COMPARE_AND_RETURN_NAME)
6519 #undef COMPARE_AND_RETURN_NAME
6520 #define COMPARE_AND_RETURN_NAME(name) \
6521 case FIRST_FIXED_ARRAY_SUB_TYPE + name: \
6522 return "FIXED_ARRAY_TYPE/" #name;
6523 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(COMPARE_AND_RETURN_NAME)
6524 #undef COMPARE_AND_RETURN_NAME
6525 #define COMPARE_AND_RETURN_NAME(name) \
6526 case FIRST_CODE_AGE_SUB_TYPE + Code::k##name##CodeAge - Code::kFirstCodeAge: \
6527 return "CODE_TYPE/CODE_AGE/" #name;
6528 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME)
6529 #undef COMPARE_AND_RETURN_NAME
6530 }
6531 return nullptr;
6532 }
6504 } 6533 }
6505 } // namespace v8::internal 6534 } // namespace v8::internal
OLDNEW
« include/v8.h ('K') | « src/heap/heap.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698