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

Unified Diff: runtime/observatory/lib/src/elements/cpu_profile.dart

Issue 1273323002: Make allocation profile configurable (tags, function v. code) (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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 | « runtime/observatory/lib/src/elements/class_view.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/lib/src/elements/cpu_profile.dart
diff --git a/runtime/observatory/lib/src/elements/cpu_profile.dart b/runtime/observatory/lib/src/elements/cpu_profile.dart
index bb5a6269d48332e9f7d6245bfabf83e9e63d995f..e1d6d47ee632f8119b18e6313c5013ff309db7f2 100644
--- a/runtime/observatory/lib/src/elements/cpu_profile.dart
+++ b/runtime/observatory/lib/src/elements/cpu_profile.dart
@@ -448,8 +448,14 @@ class SampleBufferControlElement extends ObservatoryElement {
}
await _changeState(kFetchingState);
try {
- var params = { 'tags': tagSelector };
- var response = await isolate.invokeRpc('_getCpuProfile', params);
+ var response;
+ if (allocationProfileClass != null) {
+ response =
+ await allocationProfileClass.getAllocationSamples(tagSelector);
+ } else {
+ var params = { 'tags': tagSelector };
+ response = await isolate.invokeRpc('_getCpuProfile', params);
+ }
await _changeState(kLoadingState);
profile.load(isolate, response);
_update(profile);
@@ -512,7 +518,7 @@ class SampleBufferControlElement extends ObservatoryElement {
@observable String fetchTime = '';
@observable String loadTime = '';
@observable String tagSelector = 'UserVM';
- @observable String state = 'kFetching';
+ @observable String state = kFetchingState;
@observable var exception;
@observable var stackTrace;
@@ -521,8 +527,10 @@ class SampleBufferControlElement extends ObservatoryElement {
static const kFetchingState = 'kFetching';
static const kLoadedState = 'kLoaded';
static const kLoadingState = 'kLoading';
+ static const kNotLoadedState = 'kNotLoaded';
Isolate isolate;
+ Class allocationProfileClass;
final CpuProfile profile = new CpuProfile();
final Stopwatch _stopWatch = new Stopwatch();
« no previous file with comments | « runtime/observatory/lib/src/elements/class_view.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698