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

Side by Side Diff: src/log.cc

Issue 1935: New static flags system (Closed)
Patch Set: Merge, again. Created 12 years, 3 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 | « src/ic-ia32.cc ('k') | src/macro-assembler-arm.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 19 matching lines...) Expand all
30 #include "v8.h" 30 #include "v8.h"
31 31
32 #include "log.h" 32 #include "log.h"
33 #include "platform.h" 33 #include "platform.h"
34 34
35 namespace v8 { namespace internal { 35 namespace v8 { namespace internal {
36 36
37 #ifdef ENABLE_LOGGING_AND_PROFILING 37 #ifdef ENABLE_LOGGING_AND_PROFILING
38 38
39 // 39 //
40 // Command line flags used by Logger.
41 //
42 DEFINE_bool(log, false,
43 "Minimal logging (no API, code, GC, suspect, or handles samples).");
44 DEFINE_bool(log_all, false, "Log all events to the log file.");
45 DEFINE_bool(log_api, false, "Log API events to the log file.");
46 DEFINE_bool(log_code, false,
47 "Log code events to the log file without profiling.");
48 DEFINE_bool(log_gc, false,
49 "Log heap samples on garbage collection for the hp2ps tool.");
50 DEFINE_bool(log_handles, false, "Log global handle events.");
51 DEFINE_bool(log_state_changes, false, "Log state changes.");
52 DEFINE_bool(log_suspect, false, "Log suspect operations.");
53 DEFINE_bool(prof, false,
54 "Log statistical profiling information (implies --log-code).");
55 DEFINE_bool(log_regexp, false,
56 "Log regular expression execution.");
57 DEFINE_bool(sliding_state_window, false,
58 "Update sliding state window counters.");
59
60 DEFINE_string(logfile, "v8.log", "Specify the name of the log file.");
61
62
63 //
64 // Sliding state window. Updates counters to keep track of the last 40 // Sliding state window. Updates counters to keep track of the last
65 // window of kBufferSize states. This is useful to track where we 41 // window of kBufferSize states. This is useful to track where we
66 // spent our time. 42 // spent our time.
67 // 43 //
68 class SlidingStateWindow { 44 class SlidingStateWindow {
69 public: 45 public:
70 SlidingStateWindow(); 46 SlidingStateWindow();
71 ~SlidingStateWindow(); 47 ~SlidingStateWindow();
72 void AddState(StateTag state); 48 void AddState(StateTag state);
73 49
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 if (FLAG_log_state_changes) { 788 if (FLAG_log_state_changes) {
813 LOG(StringEvent("Leaving", StateToString(state_))); 789 LOG(StringEvent("Leaving", StateToString(state_)));
814 if (previous_) { 790 if (previous_) {
815 LOG(StringEvent("To", StateToString(previous_->state_))); 791 LOG(StringEvent("To", StateToString(previous_->state_)));
816 } 792 }
817 } 793 }
818 } 794 }
819 #endif 795 #endif
820 796
821 } } // namespace v8::internal 797 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ic-ia32.cc ('k') | src/macro-assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698