01.17.08

ROM Usage Treemap

Posted in Development, Integration, Mobile, Treemap at 6:32 pm by design

Finally, in the last in my series of post on Treemaps. I bring you the ROM size treemap.

There are two ways of getting the data. On a pre S603.0 device, it was easy to generate a list of files on the ROM (the ‘z:’ drive). But due to platform security this is no longer possible from a 3rd party application.

The second way is to cross reference the log files generated by the ROM build processes. After a ROM has been build, the .log file contains a list of binaries and their size in ROM and the .dir file contains a map from the binary name to the file system.

So with the .log and .dir files in hand, a ROM size treemap can be constructed.

The following screen shot was generated on a development ROM with a large core image and small ROFS (read only file system) which together form the composite “z” file system.

The file names have been annonomised (sorry), but you can see the contribution of binaries verses resources etc. The files are coloured by file extension.

Example ROM treemap

As a teaser – the largest binary in the top left of sys/bin is the webcore.dll.

01.14.08

More LOC treemaps

Posted in Development, Integration, Treemap at 1:43 am by Twm

Following on from the recent post on using Treemaps to visualise large code bases. I’ve made some improvements to the scripts and have successfully used the tools on the biggest code bases I could find.

I was having problems with the Treemap app failing silently with large data sets. A bit of binary chopping showed that the app failed as it’s RAM reached the default java heap size for the VM.

All is well if you run it with a 960MB maximum heap.

java -Xms32m -Xmx960m -jar treemap.jar

Secondly, I found it useful to filter out test code. And so I’ve updated the script with an option “-t” to skip any paths which include the word “test”.

And finally, I added a column which computed the code/comment density. Where 100% Means one line of comment for every line of code. Please see the subsystem screen shot below in which the brighter green represents a higher density of comments.

Subsystem detail Treemap

12.09.07

Visualising large code bases using Treemaps

Posted in Development, Treemap, c++, complexity at 4:46 am by Twm

In a previous posting, I desribed a method for extracting LOC (lines of code) statistics from a large code base.

I’ve been playing around with Universtity of Maryland’s treemap visualisation tools. For those who don’t know what a Treemap is, the site has some good video tutorials or just google. There is a little bit of a learning curve to understanding and using them

Tremaps were invented by Ben Shneiderman (yep, same guy who created the Nasty-spiderman diagrams as we used to call them in school). Shneiderman wanted a tool to quickly visualise the large clusters of files on hard disk to find out where his space was really being wasted.
The use of Treemaps have extended to other domains with varying degrees of success, and my interest in treemaps was recently rekindled on seeing Tim O’Reilly use Treemap to visualise trends in the book market segments on his blog.

If we group LOC counts for each file by their directory hierarchy then it’s possible to visualise the components of a System in terms of their LOC contribution to the overall code base.
It’s a fascinating exercise. The picture below shows the Treemap for a multimillion line code base. (Note that I’ve anonymised the data by taking an MD5 of the strings, so it looks a bit less friendly than the real view).

LOC treemap
Read the rest of this entry »