1.0 Object State
We can use the source code to derive a diagram which shows the Service related objects which should exist in the Service client process and their
relationships following a successful call to bindService()
.
2.0 Java Heap State
We can use the state of the Java heap of the Service client process following the call to bindService()
to check whether the code that runs
is actually doing what we think it is.
We can obtain a dump of the Java heap state and examine it interactively using a tool like MAT.
Alternatively we can generate a graph from the dump of the Java heap state which shows the relationships between the objects graphically.
This graph was generated using the LoadedApk
object [0x40513e90
] as the root.
The greyed out nodes have been filtered, that is, one or more instance variables have been omitted. This makes the graph a bit less complicated.
Although it is not exactly obvious the following objects are present in the generated object graph as expected
-
ServiceDispatcher
[0x405213b8
] -
ConnectionInfo
[0x40521b40
] -
InnerConnection
[0x405216b8
] -
FastnetServiceConnection
[0x405211f0
]
and the relationships between them are also as expected.
Copyright (c) 2012 By Simon Lewis. All Rights Reserved.
[…] in the Service client case we can use the source code to derive a diagram which shows the Service related objects which […]
Pingback by Adventures In Distributed Garbage Collection: Part Ten – Post Bind Service State « Just An Application — May 21, 2012 @ 6:00 am
[…] in the Service client and Service cases we can use the source code to derive a diagram which shows the Service related […]
Pingback by Adventures In Distributed Garbage Collection: Part Eleven – Post Bind System Process State « Just An Application — May 22, 2012 @ 6:02 am