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

Side by Side Diff: runtime/vm/log.h

Issue 2994143002: [VM logging] Fix nesting of log blocker. (Closed)
Patch Set: address comment Created 3 years, 4 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 | runtime/vm/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 (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
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
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_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698