| OLD | NEW |
| 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 return current_state_ ? current_state_->state() : OTHER; | 192 return current_state_ ? current_state_->state() : OTHER; |
| 193 } | 193 } |
| 194 #endif | 194 #endif |
| 195 | 195 |
| 196 #ifdef ENABLE_LOGGING_AND_PROFILING | 196 #ifdef ENABLE_LOGGING_AND_PROFILING |
| 197 private: | 197 private: |
| 198 | 198 |
| 199 // Emits the source code of a regexp. Used by regexp events. | 199 // Emits the source code of a regexp. Used by regexp events. |
| 200 static void LogRegExpSource(Handle<JSRegExp> regexp); | 200 static void LogRegExpSource(Handle<JSRegExp> regexp); |
| 201 | 201 |
| 202 static void LogString(Handle<String> str); |
| 203 |
| 202 // Emits a profiler tick event. Used by the profiler thread. | 204 // Emits a profiler tick event. Used by the profiler thread. |
| 203 static void TickEvent(TickSample* sample, bool overflow); | 205 static void TickEvent(TickSample* sample, bool overflow); |
| 204 | 206 |
| 205 static void ApiEvent(const char* name, ...); | 207 static void ApiEvent(const char* name, ...); |
| 206 | 208 |
| 207 // When logging is active, logfile_ refers the file | 209 // When logging is active, logfile_ refers the file |
| 208 // events are written to. | 210 // events are written to. |
| 209 static FILE* logfile_; | 211 static FILE* logfile_; |
| 210 | 212 |
| 211 // The sampler used by the profiler and the sliding state window. | 213 // The sampler used by the profiler and the sliding state window. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 234 friend class Profiler; | 236 friend class Profiler; |
| 235 friend class SlidingStateWindow; | 237 friend class SlidingStateWindow; |
| 236 friend class VMState; | 238 friend class VMState; |
| 237 #endif | 239 #endif |
| 238 }; | 240 }; |
| 239 | 241 |
| 240 | 242 |
| 241 } } // namespace v8::internal | 243 } } // namespace v8::internal |
| 242 | 244 |
| 243 #endif // V8_LOG_H_ | 245 #endif // V8_LOG_H_ |
| OLD | NEW |