OLD | NEW |
---|---|
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "cc/resources/tile_manager.h" | 5 #include "cc/resources/tile_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
867 // OOM reporting uses hard-limit, soft-OOM is normal depending on limit. | 867 // OOM reporting uses hard-limit, soft-OOM is normal depending on limit. |
868 ever_exceeded_memory_budget_ |= oomed_hard; | 868 ever_exceeded_memory_budget_ |= oomed_hard; |
869 if (ever_exceeded_memory_budget_) { | 869 if (ever_exceeded_memory_budget_) { |
870 TRACE_COUNTER_ID2("cc", | 870 TRACE_COUNTER_ID2("cc", |
871 "over_memory_budget", | 871 "over_memory_budget", |
872 this, | 872 this, |
873 "budget", | 873 "budget", |
874 global_state_.hard_memory_limit_in_bytes, | 874 global_state_.hard_memory_limit_in_bytes, |
875 "over", | 875 "over", |
876 bytes_that_exceeded_memory_budget); | 876 bytes_that_exceeded_memory_budget); |
877 | |
878 UMA_HISTOGRAM_BOOLEAN("TileManager.ExceededMemoryBudget", true); | |
vmpstr
2014/07/05 17:34:41
I think what we should have is
UMA_HISTOGRAM_BOOL
| |
877 } | 879 } |
878 memory_stats_from_last_assign_.total_budget_in_bytes = | 880 memory_stats_from_last_assign_.total_budget_in_bytes = |
879 global_state_.hard_memory_limit_in_bytes; | 881 global_state_.hard_memory_limit_in_bytes; |
880 memory_stats_from_last_assign_.bytes_allocated = | 882 memory_stats_from_last_assign_.bytes_allocated = |
881 hard_bytes_allocatable - hard_bytes_left; | 883 hard_bytes_allocatable - hard_bytes_left; |
882 memory_stats_from_last_assign_.bytes_unreleasable = | 884 memory_stats_from_last_assign_.bytes_unreleasable = |
883 resource_pool_->acquired_memory_usage_bytes() - bytes_releasable_; | 885 resource_pool_->acquired_memory_usage_bytes() - bytes_releasable_; |
884 memory_stats_from_last_assign_.bytes_over = bytes_that_exceeded_memory_budget; | 886 memory_stats_from_last_assign_.bytes_over = bytes_that_exceeded_memory_budget; |
885 } | 887 } |
886 | 888 |
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1576 TRACE_EVENT0("cc", "TileManager::CheckIfReadyToActivate"); | 1578 TRACE_EVENT0("cc", "TileManager::CheckIfReadyToActivate"); |
1577 | 1579 |
1578 rasterizer_->CheckForCompletedTasks(); | 1580 rasterizer_->CheckForCompletedTasks(); |
1579 did_check_for_completed_tasks_since_last_schedule_tasks_ = true; | 1581 did_check_for_completed_tasks_since_last_schedule_tasks_ = true; |
1580 | 1582 |
1581 if (IsReadyToActivate()) | 1583 if (IsReadyToActivate()) |
1582 client_->NotifyReadyToActivate(); | 1584 client_->NotifyReadyToActivate(); |
1583 } | 1585 } |
1584 | 1586 |
1585 } // namespace cc | 1587 } // namespace cc |
OLD | NEW |