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

Side by Side Diff: src/log-utils.h

Issue 6904127: ll_prof: Reduce profiling hooks overhead from >400% to 25%. (Closed)
Patch Set: Review fixes Created 9 years, 7 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/log.cc ('k') | src/log-utils.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-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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 // Whether logging is stopped (e.g. due to insufficient resources). 147 // Whether logging is stopped (e.g. due to insufficient resources).
148 bool is_stopped_; 148 bool is_stopped_;
149 149
150 // When logging is active, either output_handle_ or output_buffer_ is used 150 // When logging is active, either output_handle_ or output_buffer_ is used
151 // to store a pointer to log destination. If logging was opened via OpenStdout 151 // to store a pointer to log destination. If logging was opened via OpenStdout
152 // or OpenFile, then output_handle_ is used. If logging was opened 152 // or OpenFile, then output_handle_ is used. If logging was opened
153 // via OpenMemoryBuffer, then output_buffer_ is used. 153 // via OpenMemoryBuffer, then output_buffer_ is used.
154 // mutex_ should be acquired before using output_handle_ or output_buffer_. 154 // mutex_ should be acquired before using output_handle_ or output_buffer_.
155 FILE* output_handle_; 155 FILE* output_handle_;
156 156
157 // Used when low-level profiling is active to save code object contents. 157 // Used when low-level profiling is active.
158 FILE* output_code_handle_; 158 FILE* ll_output_handle_;
159 159
160 LogDynamicBuffer* output_buffer_; 160 LogDynamicBuffer* output_buffer_;
161 161
162 // Size of dynamic buffer block (and dynamic buffer initial size). 162 // Size of dynamic buffer block (and dynamic buffer initial size).
163 static const int kDynamicBufferBlockSize = 65536; 163 static const int kDynamicBufferBlockSize = 65536;
164 164
165 // Maximum size of dynamic buffer. 165 // Maximum size of dynamic buffer.
166 static const int kMaxDynamicBufferSize = 50 * 1024 * 1024; 166 static const int kMaxDynamicBufferSize = 50 * 1024 * 1024;
167 167
168 // Message to "seal" dynamic buffer with. 168 // Message to "seal" dynamic buffer with.
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 Log* log_; 220 Log* log_;
221 ScopedLock sl; 221 ScopedLock sl;
222 int pos_; 222 int pos_;
223 }; 223 };
224 224
225 #endif // ENABLE_LOGGING_AND_PROFILING 225 #endif // ENABLE_LOGGING_AND_PROFILING
226 226
227 } } // namespace v8::internal 227 } } // namespace v8::internal
228 228
229 #endif // V8_LOG_UTILS_H_ 229 #endif // V8_LOG_UTILS_H_
OLDNEW
« no previous file with comments | « src/log.cc ('k') | src/log-utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698