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

Side by Side Diff: src/frames.cc

Issue 1700533003: Fix MSAN warning on simulator during cpu profiling. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « 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/frames.h" 5 #include "src/frames.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/ast/ast.h" 9 #include "src/ast/ast.h"
10 #include "src/ast/scopeinfo.h" 10 #include "src/ast/scopeinfo.h"
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 StackFrame::Type StackFrame::ComputeType(const StackFrameIteratorBase* iterator, 407 StackFrame::Type StackFrame::ComputeType(const StackFrameIteratorBase* iterator,
408 State* state) { 408 State* state) {
409 DCHECK(state->fp != NULL); 409 DCHECK(state->fp != NULL);
410 410
411 if (!iterator->can_access_heap_objects_) { 411 if (!iterator->can_access_heap_objects_) {
412 // TODO(titzer): "can_access_heap_objects" is kind of bogus. It really 412 // TODO(titzer): "can_access_heap_objects" is kind of bogus. It really
413 // means that we are being called from the profiler, which can interrupt 413 // means that we are being called from the profiler, which can interrupt
414 // the VM with a signal at any arbitrary instruction, with essentially 414 // the VM with a signal at any arbitrary instruction, with essentially
415 // anything on the stack. So basically none of these checks are 100% 415 // anything on the stack. So basically none of these checks are 100%
416 // reliable. 416 // reliable.
417 #if defined(USE_SIMULATOR)
418 MSAN_MEMORY_IS_INITIALIZED(
419 state->fp + StandardFrameConstants::kContextOffset, kPointerSize);
420 MSAN_MEMORY_IS_INITIALIZED(
421 state->fp + StandardFrameConstants::kMarkerOffset, kPointerSize);
422 #endif
417 if (StandardFrame::IsArgumentsAdaptorFrame(state->fp)) { 423 if (StandardFrame::IsArgumentsAdaptorFrame(state->fp)) {
418 // An adapter frame has a special SMI constant for the context and 424 // An adapter frame has a special SMI constant for the context and
419 // is not distinguished through the marker. 425 // is not distinguished through the marker.
420 return ARGUMENTS_ADAPTOR; 426 return ARGUMENTS_ADAPTOR;
421 } 427 }
422 Object* marker = 428 Object* marker =
423 Memory::Object_at(state->fp + StandardFrameConstants::kMarkerOffset); 429 Memory::Object_at(state->fp + StandardFrameConstants::kMarkerOffset);
424 if (marker->IsSmi()) { 430 if (marker->IsSmi()) {
425 return static_cast<StackFrame::Type>(Smi::cast(marker)->value()); 431 return static_cast<StackFrame::Type>(Smi::cast(marker)->value());
426 } else { 432 } else {
(...skipping 1230 matching lines...) Expand 10 before | Expand all | Expand 10 after
1657 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { 1663 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) {
1658 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); 1664 StackFrame* frame = AllocateFrameCopy(it.frame(), zone);
1659 list.Add(frame, zone); 1665 list.Add(frame, zone);
1660 } 1666 }
1661 return list.ToVector(); 1667 return list.ToVector();
1662 } 1668 }
1663 1669
1664 1670
1665 } // namespace internal 1671 } // namespace internal
1666 } // namespace v8 1672 } // 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