| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef RUNTIME_VM_LOG_H_ | 5 #ifndef RUNTIME_VM_LOG_H_ |
| 6 #define RUNTIME_VM_LOG_H_ | 6 #define RUNTIME_VM_LOG_H_ |
| 7 | 7 |
| 8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
| 9 #include "vm/growable_array.h" | 9 #include "vm/growable_array.h" |
| 10 #include "vm/os.h" | 10 #include "vm/os.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 | 45 |
| 46 // Current cursor. | 46 // Current cursor. |
| 47 intptr_t cursor() const; | 47 intptr_t cursor() const; |
| 48 | 48 |
| 49 // A logger that does nothing. | 49 // A logger that does nothing. |
| 50 static Log* NoOpLog(); | 50 static Log* NoOpLog(); |
| 51 | 51 |
| 52 private: | 52 private: |
| 53 void TerminateString(); | 53 void TerminateString(); |
| 54 void EnableManualFlush(); | 54 void EnableManualFlush(); |
| 55 void DisableManualFlush(); | 55 void DisableManualFlush(const intptr_t cursor); |
| 56 | 56 |
| 57 // Returns false if we should drop log messages related to 'isolate'. | 57 // Returns false if we should drop log messages related to 'isolate'. |
| 58 static bool ShouldLogForIsolate(const Isolate* isolate); | 58 static bool ShouldLogForIsolate(const Isolate* isolate); |
| 59 | 59 |
| 60 static Log noop_log_; | 60 static Log noop_log_; |
| 61 LogPrinter printer_; | 61 LogPrinter printer_; |
| 62 intptr_t manual_flush_; | 62 intptr_t manual_flush_; |
| 63 MallocGrowableArray<char> buffer_; | 63 MallocGrowableArray<char> buffer_; |
| 64 | 64 |
| 65 friend class LogBlock; | 65 friend class LogBlock; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 88 private: | 88 private: |
| 89 void Initialize(); | 89 void Initialize(); |
| 90 | 90 |
| 91 Log* const log_; | 91 Log* const log_; |
| 92 const intptr_t cursor_; | 92 const intptr_t cursor_; |
| 93 }; | 93 }; |
| 94 | 94 |
| 95 } // namespace dart | 95 } // namespace dart |
| 96 | 96 |
| 97 #endif // RUNTIME_VM_LOG_H_ | 97 #endif // RUNTIME_VM_LOG_H_ |
| OLD | NEW |