Chromium Code Reviews| Index: chrome/test/pyautolib/remote_inspector_client.py |
| diff --git a/chrome/test/pyautolib/remote_inspector_client.py b/chrome/test/pyautolib/remote_inspector_client.py |
| index bda06c7ebef254b27e3e005115144c35ccc99e88..bcbac8f01f5a5408fd8a838032e6f358ff151d37 100755 |
| --- a/chrome/test/pyautolib/remote_inspector_client.py |
| +++ b/chrome/test/pyautolib/remote_inspector_client.py |
| @@ -726,6 +726,20 @@ class NativeMemorySnapshot(object): |
| known_size += child['size'] |
| return self.GetProcessPrivateMemorySize() - known_size |
| + def GetInstrumentedObjectsCount(self): |
|
dennis_jeffrey
2012/10/04 01:16:33
add a docstring and mention what is returned if th
yurys
2012/10/04 15:07:47
Done.
|
| + memory_block = self.FindMemoryBlock(['ProcessPrivateMemory', |
| + 'InstrumentedObjectsCount']) |
| + if not memory_block is None: |
| + return memory_block['size'] |
| + return -1 |
|
dennis_jeffrey
2012/10/04 01:16:33
would returning None be preferable to a -1? That
yurys
2012/10/04 15:07:47
Good idea, fixed!
|
| + |
| + def GetNumberOfInstrumentedObjectsNotInHeap(self): |
|
dennis_jeffrey
2012/10/04 01:16:33
add a docstring and mention what is returned if th
yurys
2012/10/04 15:07:47
Done.
|
| + memory_block = self.FindMemoryBlock(['ProcessPrivateMemory', |
| + 'InstrumentedButNotAllocatedObjectsCount']) |
| + if not memory_block is None: |
| + return memory_block['size'] |
| + return -1 |
|
dennis_jeffrey
2012/10/04 01:16:33
same comment as line 734 above
yurys
2012/10/04 15:07:47
Done.
|
| + |
| def FindMemoryBlock(self, path): |
| """Find memory block with given path. |