OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "webkit/glue/webkitplatformsupport_impl.h" | 5 #include "webkit/glue/webkitplatformsupport_impl.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 counter->Add(sample); | 444 counter->Add(sample); |
445 } | 445 } |
446 | 446 |
447 const unsigned char* WebKitPlatformSupportImpl::getTraceCategoryEnabledFlag( | 447 const unsigned char* WebKitPlatformSupportImpl::getTraceCategoryEnabledFlag( |
448 const char* category_group) { | 448 const char* category_group) { |
449 return TRACE_EVENT_API_GET_CATEGORY_GROUP_ENABLED(category_group); | 449 return TRACE_EVENT_API_GET_CATEGORY_GROUP_ENABLED(category_group); |
450 } | 450 } |
451 | 451 |
452 long* WebKitPlatformSupportImpl::getTraceSamplingState( | 452 long* WebKitPlatformSupportImpl::getTraceSamplingState( |
453 const unsigned thread_bucket) { | 453 const unsigned thread_bucket) { |
| 454 // Not supported in split-dll build. http://crbug.com/237249 |
| 455 #if !defined(CHROME_SPLIT_DLL) |
454 switch (thread_bucket) { | 456 switch (thread_bucket) { |
455 case 0: | 457 case 0: |
456 return reinterpret_cast<long*>(&TRACE_EVENT_API_THREAD_BUCKET(0)); | 458 return reinterpret_cast<long*>(&TRACE_EVENT_API_THREAD_BUCKET(0)); |
457 case 1: | 459 case 1: |
458 return reinterpret_cast<long*>(&TRACE_EVENT_API_THREAD_BUCKET(1)); | 460 return reinterpret_cast<long*>(&TRACE_EVENT_API_THREAD_BUCKET(1)); |
459 case 2: | 461 case 2: |
460 return reinterpret_cast<long*>(&TRACE_EVENT_API_THREAD_BUCKET(2)); | 462 return reinterpret_cast<long*>(&TRACE_EVENT_API_THREAD_BUCKET(2)); |
461 default: | 463 default: |
462 NOTREACHED() << "Unknown thread bucket type."; | 464 NOTREACHED() << "Unknown thread bucket type."; |
463 } | 465 } |
| 466 #endif |
464 return NULL; | 467 return NULL; |
465 } | 468 } |
466 | 469 |
467 void WebKitPlatformSupportImpl::addTraceEvent( | 470 void WebKitPlatformSupportImpl::addTraceEvent( |
468 char phase, | 471 char phase, |
469 const unsigned char* category_group_enabled, | 472 const unsigned char* category_group_enabled, |
470 const char* name, | 473 const char* name, |
471 unsigned long long id, | 474 unsigned long long id, |
472 int num_args, | 475 int num_args, |
473 const char** arg_names, | 476 const char** arg_names, |
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
914 if (--shared_timer_suspended_ == 0 && | 917 if (--shared_timer_suspended_ == 0 && |
915 (!shared_timer_.IsRunning() || | 918 (!shared_timer_.IsRunning() || |
916 shared_timer_fire_time_was_set_while_suspended_)) { | 919 shared_timer_fire_time_was_set_while_suspended_)) { |
917 shared_timer_fire_time_was_set_while_suspended_ = false; | 920 shared_timer_fire_time_was_set_while_suspended_ = false; |
918 setSharedTimerFireInterval( | 921 setSharedTimerFireInterval( |
919 shared_timer_fire_time_ - monotonicallyIncreasingTime()); | 922 shared_timer_fire_time_ - monotonicallyIncreasingTime()); |
920 } | 923 } |
921 } | 924 } |
922 | 925 |
923 } // namespace webkit_glue | 926 } // namespace webkit_glue |
OLD | NEW |