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

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

Issue 249553003: Connect heap map to instance view. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 8 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
« no previous file with comments | « runtime/bin/vmservice/client/lib/src/elements/heap_map.dart ('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 "vm/service.h" 5 #include "vm/service.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/globals.h" 8 #include "platform/globals.h"
9 9
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 1567 matching lines...) Expand 10 before | Expand all | Expand 10 after
1578 1578
1579 class ContainsAddressVisitor : public FindObjectVisitor { 1579 class ContainsAddressVisitor : public FindObjectVisitor {
1580 public: 1580 public:
1581 ContainsAddressVisitor(Isolate* isolate, uword addr) 1581 ContainsAddressVisitor(Isolate* isolate, uword addr)
1582 : FindObjectVisitor(isolate), addr_(addr) { } 1582 : FindObjectVisitor(isolate), addr_(addr) { }
1583 virtual ~ContainsAddressVisitor() { } 1583 virtual ~ContainsAddressVisitor() { }
1584 1584
1585 virtual uword filter_addr() const { return addr_; } 1585 virtual uword filter_addr() const { return addr_; }
1586 1586
1587 virtual bool FindObject(RawObject* obj) const { 1587 virtual bool FindObject(RawObject* obj) const {
1588 // Free list elements are not real objects, so skip them.
1589 if (obj->IsFreeListElement()) {
1590 return false;
1591 }
1588 uword obj_begin = RawObject::ToAddr(obj); 1592 uword obj_begin = RawObject::ToAddr(obj);
1589 uword obj_end = obj_begin + obj->Size(); 1593 uword obj_end = obj_begin + obj->Size();
1590 return obj_begin <= addr_ && addr_ < obj_end; 1594 return obj_begin <= addr_ && addr_ < obj_end;
1591 } 1595 }
1592 private: 1596 private:
1593 uword addr_; 1597 uword addr_;
1594 }; 1598 };
1595 1599
1596 1600
1597 static bool HandleAddress(Isolate* isolate, JSONStream* js) { 1601 static bool HandleAddress(Isolate* isolate, JSONStream* js) {
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
1899 while (current != NULL) { 1903 while (current != NULL) {
1900 if (strcmp(name, current->name()) == 0) { 1904 if (strcmp(name, current->name()) == 0) {
1901 return current; 1905 return current;
1902 } 1906 }
1903 current = current->next(); 1907 current = current->next();
1904 } 1908 }
1905 return NULL; 1909 return NULL;
1906 } 1910 }
1907 1911
1908 } // namespace dart 1912 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/vmservice/client/lib/src/elements/heap_map.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698