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

Side by Side Diff: src/log.h

Issue 437004: Store API callback entry address prior to entering a callback. (Closed)
Patch Set: Created 11 years 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/builtins.cc ('k') | src/log.cc » ('j') | src/log.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 v8::internal::Logger::Call; \ 84 v8::internal::Logger::Call; \
85 } while (false) 85 } while (false)
86 #else 86 #else
87 #define LOG(Call) ((void) 0) 87 #define LOG(Call) ((void) 0)
88 #endif 88 #endif
89 89
90 90
91 class VMState BASE_EMBEDDED { 91 class VMState BASE_EMBEDDED {
92 #ifdef ENABLE_LOGGING_AND_PROFILING 92 #ifdef ENABLE_LOGGING_AND_PROFILING
93 public: 93 public:
94 inline explicit VMState(StateTag state); 94 inline VMState(StateTag state);
95 inline ~VMState(); 95 inline ~VMState();
96 96
97 StateTag state() { return state_; } 97 StateTag state() { return state_; }
98 Address external_callback() { return external_callback_; }
99 void set_external_callback(Address external_callback) {
100 external_callback_ = external_callback;
101 }
98 102
99 private: 103 private:
100 bool disabled_; 104 bool disabled_;
101 StateTag state_; 105 StateTag state_;
102 VMState* previous_; 106 VMState* previous_;
107 Address external_callback_;
103 #else 108 #else
104 public: 109 public:
105 explicit VMState(StateTag state) {} 110 explicit VMState(StateTag state) {}
106 #endif 111 #endif
107 }; 112 };
108 113
109 114
110 #define LOG_EVENTS_AND_TAGS_LIST(V) \ 115 #define LOG_EVENTS_AND_TAGS_LIST(V) \
111 V(CODE_CREATION_EVENT, "code-creation", "cc") \ 116 V(CODE_CREATION_EVENT, "code-creation", "cc") \
112 V(CODE_MOVE_EVENT, "code-move", "cm") \ 117 V(CODE_MOVE_EVENT, "code-move", "cm") \
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 // An instance of helper created if log compression is enabled. 331 // An instance of helper created if log compression is enabled.
327 static CompressionHelper* compression_helper_; 332 static CompressionHelper* compression_helper_;
328 333
329 // Internal implementation classes with access to 334 // Internal implementation classes with access to
330 // private members. 335 // private members.
331 friend class CompressionHelper; 336 friend class CompressionHelper;
332 friend class EventLog; 337 friend class EventLog;
333 friend class TimeLog; 338 friend class TimeLog;
334 friend class Profiler; 339 friend class Profiler;
335 friend class SlidingStateWindow; 340 friend class SlidingStateWindow;
341 friend class StackTracer;
336 friend class VMState; 342 friend class VMState;
337 343
338 friend class LoggerTestHelper; 344 friend class LoggerTestHelper;
339 345
340 static bool is_logging_; 346 static bool is_logging_;
341 #else 347 #else
342 static bool is_logging() { return false; } 348 static bool is_logging() { return false; }
343 #endif 349 #endif
344 }; 350 };
345 351
346 352
347 // Class that extracts stack trace, used for profiling. 353 // Class that extracts stack trace, used for profiling.
348 class StackTracer : public AllStatic { 354 class StackTracer : public AllStatic {
349 public: 355 public:
350 static void Trace(TickSample* sample); 356 static void Trace(TickSample* sample);
351 }; 357 };
352 358
353 359
354 } } // namespace v8::internal 360 } } // namespace v8::internal
355 361
356 #endif // V8_LOG_H_ 362 #endif // V8_LOG_H_
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/log.cc » ('j') | src/log.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698