OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 29 matching lines...) Expand all Loading... |
40 public: | 40 public: |
41 // Performs process-wide initialization. | 41 // Performs process-wide initialization. |
42 void Initialize(const char* log_file_name); | 42 void Initialize(const char* log_file_name); |
43 | 43 |
44 // Disables logging, but preserves acquired resources. | 44 // Disables logging, but preserves acquired resources. |
45 void stop() { is_stopped_ = true; } | 45 void stop() { is_stopped_ = true; } |
46 | 46 |
47 static bool InitLogAtStart() { | 47 static bool InitLogAtStart() { |
48 return FLAG_log || FLAG_log_runtime || FLAG_log_api | 48 return FLAG_log || FLAG_log_runtime || FLAG_log_api |
49 || FLAG_log_code || FLAG_log_gc || FLAG_log_handles || FLAG_log_suspect | 49 || FLAG_log_code || FLAG_log_gc || FLAG_log_handles || FLAG_log_suspect |
50 || FLAG_log_regexp || FLAG_ll_prof || FLAG_log_internal_timer_events; | 50 || FLAG_log_regexp || FLAG_ll_prof || FLAG_perf_basic_prof |
| 51 || FLAG_perf_jit_prof || FLAG_log_internal_timer_events; |
51 } | 52 } |
52 | 53 |
53 // Frees all resources acquired in Initialize and Open... functions. | 54 // Frees all resources acquired in Initialize and Open... functions. |
54 // When a temporary file is used for the log, returns its stream descriptor, | 55 // When a temporary file is used for the log, returns its stream descriptor, |
55 // leaving the file open. | 56 // leaving the file open. |
56 FILE* Close(); | 57 FILE* Close(); |
57 | 58 |
58 // Returns whether logging is enabled. | 59 // Returns whether logging is enabled. |
59 bool IsEnabled() { | 60 bool IsEnabled() { |
60 return !is_stopped_ && output_handle_ != NULL; | 61 return !is_stopped_ && output_handle_ != NULL; |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 | 151 |
151 Logger* logger_; | 152 Logger* logger_; |
152 | 153 |
153 friend class Logger; | 154 friend class Logger; |
154 }; | 155 }; |
155 | 156 |
156 | 157 |
157 } } // namespace v8::internal | 158 } } // namespace v8::internal |
158 | 159 |
159 #endif // V8_LOG_UTILS_H_ | 160 #endif // V8_LOG_UTILS_H_ |
OLD | NEW |