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

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

Issue 1433663002: Do not print stack-trace for OOM when GC is in progress. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | 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/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/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/once.h" 10 #include "src/base/once.h"
(...skipping 4838 matching lines...) Expand 10 before | Expand all | Expand 10 after
4849 DCHECK(0 <= type && type <= LAST_TYPE); 4849 DCHECK(0 <= type && type <= LAST_TYPE);
4850 stats->objects_per_type[type]++; 4850 stats->objects_per_type[type]++;
4851 stats->size_per_type[type] += obj->Size(); 4851 stats->size_per_type[type] += obj->Size();
4852 } 4852 }
4853 } 4853 }
4854 if (stats->last_few_messages != NULL) 4854 if (stats->last_few_messages != NULL)
4855 GetFromRingBuffer(stats->last_few_messages); 4855 GetFromRingBuffer(stats->last_few_messages);
4856 if (stats->js_stacktrace != NULL) { 4856 if (stats->js_stacktrace != NULL) {
4857 FixedStringAllocator fixed(stats->js_stacktrace, kStacktraceBufferSize - 1); 4857 FixedStringAllocator fixed(stats->js_stacktrace, kStacktraceBufferSize - 1);
4858 StringStream accumulator(&fixed, StringStream::kPrintObjectConcise); 4858 StringStream accumulator(&fixed, StringStream::kPrintObjectConcise);
4859 isolate()->PrintStack(&accumulator, Isolate::kPrintStackVerbose); 4859 if (gc_state() == Heap::NOT_IN_GC) {
4860 isolate()->PrintStack(&accumulator, Isolate::kPrintStackVerbose);
4861 } else {
4862 accumulator.Add("Cannot get stack trace in GC.");
4863 }
4860 } 4864 }
4861 } 4865 }
4862 4866
4863 4867
4864 intptr_t Heap::PromotedSpaceSizeOfObjects() { 4868 intptr_t Heap::PromotedSpaceSizeOfObjects() {
4865 return old_space_->SizeOfObjects() + code_space_->SizeOfObjects() + 4869 return old_space_->SizeOfObjects() + code_space_->SizeOfObjects() +
4866 map_space_->SizeOfObjects() + lo_space_->SizeOfObjects(); 4870 map_space_->SizeOfObjects() + lo_space_->SizeOfObjects();
4867 } 4871 }
4868 4872
4869 4873
(...skipping 1314 matching lines...) Expand 10 before | Expand all | Expand 10 after
6184 } 6188 }
6185 6189
6186 6190
6187 // static 6191 // static
6188 int Heap::GetStaticVisitorIdForMap(Map* map) { 6192 int Heap::GetStaticVisitorIdForMap(Map* map) {
6189 return StaticVisitorBase::GetVisitorId(map); 6193 return StaticVisitorBase::GetVisitorId(map);
6190 } 6194 }
6191 6195
6192 } // namespace internal 6196 } // namespace internal
6193 } // namespace v8 6197 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698