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) | |
456 switch (thread_bucket) { | 454 switch (thread_bucket) { |
457 case 0: | 455 case 0: |
458 return reinterpret_cast<long*>(&TRACE_EVENT_API_THREAD_BUCKET(0)); | 456 return reinterpret_cast<long*>(&TRACE_EVENT_API_THREAD_BUCKET(0)); |
459 case 1: | 457 case 1: |
460 return reinterpret_cast<long*>(&TRACE_EVENT_API_THREAD_BUCKET(1)); | 458 return reinterpret_cast<long*>(&TRACE_EVENT_API_THREAD_BUCKET(1)); |
461 case 2: | 459 case 2: |
462 return reinterpret_cast<long*>(&TRACE_EVENT_API_THREAD_BUCKET(2)); | 460 return reinterpret_cast<long*>(&TRACE_EVENT_API_THREAD_BUCKET(2)); |
463 default: | 461 default: |
464 NOTREACHED() << "Unknown thread bucket type."; | 462 NOTREACHED() << "Unknown thread bucket type."; |
465 } | 463 } |
466 #endif | |
467 return NULL; | 464 return NULL; |
468 } | 465 } |
469 | 466 |
470 void WebKitPlatformSupportImpl::addTraceEvent( | 467 void WebKitPlatformSupportImpl::addTraceEvent( |
471 char phase, | 468 char phase, |
472 const unsigned char* category_group_enabled, | 469 const unsigned char* category_group_enabled, |
473 const char* name, | 470 const char* name, |
474 unsigned long long id, | 471 unsigned long long id, |
475 int num_args, | 472 int num_args, |
476 const char** arg_names, | 473 const char** arg_names, |
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
917 if (--shared_timer_suspended_ == 0 && | 914 if (--shared_timer_suspended_ == 0 && |
918 (!shared_timer_.IsRunning() || | 915 (!shared_timer_.IsRunning() || |
919 shared_timer_fire_time_was_set_while_suspended_)) { | 916 shared_timer_fire_time_was_set_while_suspended_)) { |
920 shared_timer_fire_time_was_set_while_suspended_ = false; | 917 shared_timer_fire_time_was_set_while_suspended_ = false; |
921 setSharedTimerFireInterval( | 918 setSharedTimerFireInterval( |
922 shared_timer_fire_time_ - monotonicallyIncreasingTime()); | 919 shared_timer_fire_time_ - monotonicallyIncreasingTime()); |
923 } | 920 } |
924 } | 921 } |
925 | 922 |
926 } // namespace webkit_glue | 923 } // namespace webkit_glue |
OLD | NEW |