Just An Application

May 21, 2012

Adventures In Distributed Garbage Collection: Part Ten – Post Bind Service State

Filed under: Android, Android Internals, Java, Mobile Java, Services — Tags: , , , , — Simon Lewis @ 6:00 am

1.0 Object State

As in the Service client case we can use the source code to derive a diagram which shows the Service related objects which should exist in the Service process and their relationships once the Service client has bound to the Service.

2.0 Java Heap State

We can use the state of the Java heap of the Service process once the client has bound to the Service to check whether the code that actually runs in this case 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 automatically generate a graph which shows the relationships between the objects in the heap graphically.

This graph was generated using the FastnetService object [0x40517518] 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.

Again, although it is not exactly obvious the heap does contain the Service related objects and state we would expect.


Copyright (c) 2012 By Simon Lewis. All Rights Reserved.

Advertisements

1 Comment »

  1. […] in the Service client and Service cases we can use the source code to derive a diagram which shows the Service related objects that […]

    Pingback by Adventures In Distributed Garbage Collection: Part Eleven – Post Bind System Process State « Just An Application — May 22, 2012 @ 6:02 am


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: