| 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 PRODUCT | 5 #ifndef PRODUCT |
| 6 | 6 |
| 7 #include <cstdlib> | 7 #include <cstdlib> |
| 8 | 8 |
| 9 #include "vm/atomic.h" | 9 #include "vm/atomic.h" |
| 10 #include "vm/isolate.h" | 10 #include "vm/isolate.h" |
| (...skipping 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1173 return; | 1173 return; |
| 1174 } | 1174 } |
| 1175 free(filename); | 1175 free(filename); |
| 1176 | 1176 |
| 1177 JSONStream js; | 1177 JSONStream js; |
| 1178 TimelineEventFilter filter; | 1178 TimelineEventFilter filter; |
| 1179 PrintTraceEvent(&js, &filter); | 1179 PrintTraceEvent(&js, &filter); |
| 1180 // Steal output from JSONStream. | 1180 // Steal output from JSONStream. |
| 1181 char* output = NULL; | 1181 char* output = NULL; |
| 1182 intptr_t output_length = 0; | 1182 intptr_t output_length = 0; |
| 1183 js.Steal(const_cast<const char**>(&output), &output_length); | 1183 js.Steal(&output, &output_length); |
| 1184 (*file_write)(output, output_length, file); | 1184 (*file_write)(output, output_length, file); |
| 1185 // Free the stolen output. | 1185 // Free the stolen output. |
| 1186 free(output); | 1186 free(output); |
| 1187 (*file_close)(file); | 1187 (*file_close)(file); |
| 1188 | 1188 |
| 1189 return; | 1189 return; |
| 1190 } | 1190 } |
| 1191 | 1191 |
| 1192 | 1192 |
| 1193 int64_t TimelineEventRecorder::GetNextAsyncId() { | 1193 int64_t TimelineEventRecorder::GetNextAsyncId() { |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1688 TimelineEventBlock* TimelineEventBlockIterator::Next() { | 1688 TimelineEventBlock* TimelineEventBlockIterator::Next() { |
| 1689 ASSERT(current_ != NULL); | 1689 ASSERT(current_ != NULL); |
| 1690 TimelineEventBlock* r = current_; | 1690 TimelineEventBlock* r = current_; |
| 1691 current_ = current_->next(); | 1691 current_ = current_->next(); |
| 1692 return r; | 1692 return r; |
| 1693 } | 1693 } |
| 1694 | 1694 |
| 1695 } // namespace dart | 1695 } // namespace dart |
| 1696 | 1696 |
| 1697 #endif // !PRODUCT | 1697 #endif // !PRODUCT |
| OLD | NEW |