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

Side by Side Diff: src/log.h

Issue 113961: Two simple profiler changes: 1) log sampling rate, 2) check current state before pausing & resuming. (Closed)
Patch Set: Created 11 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
« no previous file with comments | « no previous file | src/log.cc » ('j') | no next file with comments »
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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 213
214 // If logging is performed into a memory buffer, allows to 214 // If logging is performed into a memory buffer, allows to
215 // retrieve previously written messages. See v8.h. 215 // retrieve previously written messages. See v8.h.
216 static int GetLogLines(int from_pos, char* dest_buf, int max_size); 216 static int GetLogLines(int from_pos, char* dest_buf, int max_size);
217 217
218 // Logs all compiled functions found in the heap. 218 // Logs all compiled functions found in the heap.
219 static void LogCompiledFunctions(); 219 static void LogCompiledFunctions();
220 220
221 private: 221 private:
222 222
223 // Profiler's sampling interval (in milliseconds).
224 static const int kSamplingIntervalMs = 1;
225
226 // Emits the profiler's first message.
227 static void ProfilerBeginEvent();
228
223 // Emits the source code of a regexp. Used by regexp events. 229 // Emits the source code of a regexp. Used by regexp events.
224 static void LogRegExpSource(Handle<JSRegExp> regexp); 230 static void LogRegExpSource(Handle<JSRegExp> regexp);
225 231
226 // Emits a profiler tick event. Used by the profiler thread. 232 // Emits a profiler tick event. Used by the profiler thread.
227 static void TickEvent(TickSample* sample, bool overflow); 233 static void TickEvent(TickSample* sample, bool overflow);
228 234
229 static void ApiEvent(const char* name, ...); 235 static void ApiEvent(const char* name, ...);
230 236
231 // Logs a StringEvent regardless of whether FLAG_log is true. 237 // Logs a StringEvent regardless of whether FLAG_log is true.
232 static void UncheckedStringEvent(const char* name, const char* value); 238 static void UncheckedStringEvent(const char* name, const char* value);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 void Trace(TickSample* sample); 284 void Trace(TickSample* sample);
279 private: 285 private:
280 286
281 uintptr_t low_stack_bound_; 287 uintptr_t low_stack_bound_;
282 }; 288 };
283 289
284 290
285 } } // namespace v8::internal 291 } } // namespace v8::internal
286 292
287 #endif // V8_LOG_H_ 293 #endif // V8_LOG_H_
OLDNEW
« no previous file with comments | « no previous file | src/log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698