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

Unified Diff: src/frames.h

Issue 73020: Implemented "no heap access" mode for JSFrame which is used for stack sampling in profiler. (Closed)
Patch Set: Renamings as Soeren suggested Created 11 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/frames.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/frames.h
diff --git a/src/frames.h b/src/frames.h
index fbf99ffb42b9980027eacdf421c9a721a9aa1879..8ab4be9051bd6babb6f78f4f8a5dd7c212b545fa 100644
--- a/src/frames.h
+++ b/src/frames.h
@@ -373,7 +373,6 @@ class JavaScriptFrame: public StandardFrame {
virtual Type type() const { return JAVA_SCRIPT; }
// Accessors.
- inline bool is_at_function() const;
inline Object* function() const;
inline Object* receiver() const;
inline void set_receiver(Object* value);
@@ -414,11 +413,19 @@ class JavaScriptFrame: public StandardFrame {
protected:
explicit JavaScriptFrame(StackFrameIterator* iterator)
- : StandardFrame(iterator) { }
+ : StandardFrame(iterator), disable_heap_access_(false) { }
virtual Address GetCallerStackPointer() const;
+ // When this mode is enabled it is not allowed to access heap objects.
+ // This is a special mode used when gathering stack samples in profiler.
+ // A shortcoming is that caller's SP value will be calculated incorrectly
iposva 2009/04/13 23:16:09 Is there a way where you can ASSERT if the caller'
+ // (see GetCallerStackPointer implementation), but it is not used for stack
+ // sampling.
+ void DisableHeapAccess() { disable_heap_access_ = true; }
+
private:
+ bool disable_heap_access_;
inline Object* function_slot_object() const;
friend class StackFrameIterator;
« no previous file with comments | « no previous file | src/frames.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698