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

Side by Side Diff: runtime/vm/service_test.cc

Issue 345543003: Send allocation stats with each class and show in class view. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« runtime/vm/object.cc ('K') | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "platform/globals.h" 5 #include "platform/globals.h"
6 6
7 #include "include/dart_debugger_api.h" 7 #include "include/dart_debugger_api.h"
8 #include "vm/dart_api_impl.h" 8 #include "vm/dart_api_impl.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/debugger.h" 10 #include "vm/debugger.h"
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 "\"request\":{\"arguments\":[\"classes\",\"999999\"]," 719 "\"request\":{\"arguments\":[\"classes\",\"999999\"],"
720 "\"option_keys\":[],\"option_values\":[]}}", handler.msg()); 720 "\"option_keys\":[],\"option_values\":[]}}", handler.msg());
721 721
722 // Request the class A over the service. 722 // Request the class A over the service.
723 service_msg = EvalF(h_lib, "[0, port, ['classes', '%" Pd "'], [], []]", cid); 723 service_msg = EvalF(h_lib, "[0, port, ['classes', '%" Pd "'], [], []]", cid);
724 Service::HandleIsolateMessage(isolate, service_msg); 724 Service::HandleIsolateMessage(isolate, service_msg);
725 handler.HandleNextMessage(); 725 handler.HandleNextMessage();
726 EXPECT_SUBSTRING("\"type\":\"Class\"", handler.msg()); 726 EXPECT_SUBSTRING("\"type\":\"Class\"", handler.msg());
727 ExpectSubstringF(handler.msg(), 727 ExpectSubstringF(handler.msg(),
728 "\"id\":\"classes\\/%" Pd "\",\"name\":\"A\",", cid); 728 "\"id\":\"classes\\/%" Pd "\",\"name\":\"A\",", cid);
729 ExpectSubstringF(handler.msg(), "\"allocation_stats\":");
729 730
730 // Evaluate an expression from class A. 731 // Evaluate an expression from class A.
731 service_msg = EvalF(h_lib, 732 service_msg = EvalF(h_lib,
732 "[0, port, ['classes', '%" Pd "', 'eval'], " 733 "[0, port, ['classes', '%" Pd "', 'eval'], "
733 "['expr'], ['cobra + 100000']]", cid); 734 "['expr'], ['cobra + 100000']]", cid);
734 Service::HandleIsolateMessage(isolate, service_msg); 735 Service::HandleIsolateMessage(isolate, service_msg);
735 handler.HandleNextMessage(); 736 handler.HandleNextMessage();
736 handler.filterMsg("name"); 737 handler.filterMsg("name");
737 EXPECT_STREQ( 738 EXPECT_STREQ(
738 "{\"type\":\"@Smi\"," 739 "{\"type\":\"@Smi\","
(...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after
1527 service_msg = Eval(h_lib, "[0, port, ['profile'], ['tags'], ['hidden']]"); 1528 service_msg = Eval(h_lib, "[0, port, ['profile'], ['tags'], ['hidden']]");
1528 Service::HandleIsolateMessage(isolate, service_msg); 1529 Service::HandleIsolateMessage(isolate, service_msg);
1529 handler.HandleNextMessage(); 1530 handler.HandleNextMessage();
1530 // Expect error. 1531 // Expect error.
1531 EXPECT_SUBSTRING("\"type\":\"Error\"", handler.msg()); 1532 EXPECT_SUBSTRING("\"type\":\"Error\"", handler.msg());
1532 } 1533 }
1533 1534
1534 #endif // !defined(TARGET_ARCH_ARM64) 1535 #endif // !defined(TARGET_ARCH_ARM64)
1535 1536
1536 } // namespace dart 1537 } // namespace dart
OLDNEW
« runtime/vm/object.cc ('K') | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698