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

Side by Side Diff: runtime/vm/timeline.cc

Issue 2320183002: Fix Mac build (Closed)
Patch Set: Created 4 years, 3 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 | no next file » | 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 PRODUCT 5 #ifndef PRODUCT
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <cstdlib> 9 #include <cstdlib>
10 10
(...skipping 1382 matching lines...) Expand 10 before | Expand all | Expand 10 after
1393 1393
1394 1394
1395 void TimelineEventFixedBufferRecorder::CompleteEvent(TimelineEvent* event) { 1395 void TimelineEventFixedBufferRecorder::CompleteEvent(TimelineEvent* event) {
1396 if (event == NULL) { 1396 if (event == NULL) {
1397 return; 1397 return;
1398 } 1398 }
1399 ThreadBlockCompleteEvent(event); 1399 ThreadBlockCompleteEvent(event);
1400 } 1400 }
1401 1401
1402 1402
1403 static const char* kSystracePath = "/sys/kernel/debug/tracing/trace_marker";
1404
1405
1406 TimelineEventSystraceRecorder::TimelineEventSystraceRecorder(intptr_t capacity) 1403 TimelineEventSystraceRecorder::TimelineEventSystraceRecorder(intptr_t capacity)
1407 : TimelineEventFixedBufferRecorder(capacity), 1404 : TimelineEventFixedBufferRecorder(capacity),
1408 systrace_fd_(-1) { 1405 systrace_fd_(-1) {
1409 #if defined(TARGET_OS_ANDROID) || defined(TARGET_OS_LINUX) 1406 #if defined(TARGET_OS_ANDROID) || defined(TARGET_OS_LINUX)
1407 const char* kSystracePath = "/sys/kernel/debug/tracing/trace_marker";
1410 systrace_fd_ = open(kSystracePath, O_WRONLY); 1408 systrace_fd_ = open(kSystracePath, O_WRONLY);
1411 if ((systrace_fd_ < 0) && FLAG_trace_timeline) { 1409 if ((systrace_fd_ < 0) && FLAG_trace_timeline) {
1412 OS::PrintErr("TimelineEventSystraceRecorder: Could not open `%s`\n", 1410 OS::PrintErr("TimelineEventSystraceRecorder: Could not open `%s`\n",
1413 kSystracePath); 1411 kSystracePath);
1414 } 1412 }
1415 #else 1413 #else
1416 OS::PrintErr("Warning: The systrace timeline recorder is equivalent to the" 1414 OS::PrintErr("Warning: The systrace timeline recorder is equivalent to the"
1417 "ring recorder on this platform."); 1415 "ring recorder on this platform.");
1418 #endif 1416 #endif
1419 } 1417 }
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
1797 TimelineEventBlock* TimelineEventBlockIterator::Next() { 1795 TimelineEventBlock* TimelineEventBlockIterator::Next() {
1798 ASSERT(current_ != NULL); 1796 ASSERT(current_ != NULL);
1799 TimelineEventBlock* r = current_; 1797 TimelineEventBlock* r = current_;
1800 current_ = current_->next(); 1798 current_ = current_->next();
1801 return r; 1799 return r;
1802 } 1800 }
1803 1801
1804 } // namespace dart 1802 } // namespace dart
1805 1803
1806 #endif // !PRODUCT 1804 #endif // !PRODUCT
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698