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

Unified Diff: pkg/analyzer/lib/src/generated/engine.dart

Issue 913853002: Minimal initial performance reporting (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added more data Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analysis_server/lib/src/get_handler.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/engine.dart
diff --git a/pkg/analyzer/lib/src/generated/engine.dart b/pkg/analyzer/lib/src/generated/engine.dart
index abac83f3badd07d75f466e6cb2b971ffc1f11dd6..ce8605034034b9cc4f3ba3f59f26fe06ca9e8c3c 100644
--- a/pkg/analyzer/lib/src/generated/engine.dart
+++ b/pkg/analyzer/lib/src/generated/engine.dart
@@ -10926,6 +10926,10 @@ class ResolutionState {
void setValue(DataDescriptor /*<V>*/ descriptor, dynamic /*V*/ value) {
CachedResult result =
resultMap.putIfAbsent(descriptor, () => new CachedResult(descriptor));
+ if (result.state == CacheState.FLUSHED) {
+ int count = SourceEntry.unflushedCountMap[descriptor];
+ SourceEntry.unflushedCountMap[descriptor] = count == null ? 1 : count + 1;
+ }
result.state = CacheState.VALID;
result.value = value == null ? descriptor.defaultValue : value;
}
@@ -11607,6 +11611,13 @@ abstract class SourceEntry {
static int _EXPLICITLY_ADDED_FLAG = 0;
/**
+ * A table mapping data descriptors to a count of the number of times a value
+ * of that kind was flushed and then re-created.
+ */
+ static final Map<DataDescriptor, int> unflushedCountMap =
+ new HashMap<DataDescriptor, int>();
+
+ /**
* The most recent time at which the state of the source matched the state
* represented by this entry.
*/
@@ -11796,6 +11807,10 @@ abstract class SourceEntry {
_validateStateChange(descriptor, CacheState.VALID);
CachedResult result =
resultMap.putIfAbsent(descriptor, () => new CachedResult(descriptor));
+ if (result.state == CacheState.FLUSHED) {
+ int count = unflushedCountMap[descriptor];
+ unflushedCountMap[descriptor] = count == null ? 1 : count + 1;
+ }
result.state = CacheState.VALID;
result.value = value == null ? descriptor.defaultValue : value;
}
« no previous file with comments | « pkg/analysis_server/lib/src/get_handler.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698