Locating data in a dataset within memory dump
July 17, 2010 Leave a comment
Recently a troubleshooting experience led me to the need to view content of dataset in a memory dump from production server. Although, I was able to find few posts on datatable dissection, but I was curious on doing dissection from dataset to actual data. So here are the steps that I followed:
- Locate type and eventually dataset of interest. In order to locate instance of specific type, I found dumpheap -type very useful. Place it in a loop to dump information for each instance of type found.
-
. foreach ( x {!dso -type <SomeType> -short}) { !do ${x} }
-
- Next dump object (do) details for the following:
- DataSet
- tableCollection
- _list
- The _list will give an object array of name _items. Dump array (da) _items. Based pn the number of tables in dataset, you should see the addresses filled in the array. Assuming that we want to navigate to the first datatable
- Drill further on this path via dump object/array
- first item of _items array (first datatable)
- columnCollection (interesting ! I always thought of navigating via rows)
- _list (an ArrayList)
- _items (Object array – use da).
- At this point you see the columns. Choose a column address to view data and then continue do/da exercise.
- dump object on any item address of the array (each is a data column)
- Optionally, verify columnName by dumping _columnName (a string)
- Data is stored in DataStorage type (field _storage)
- dump _storage (DataStorage)
- dump _values (object array). At this point, you will have array of addresses for values of the chosen column.
- The last step is to view data. One way is to use this command:
!da -details -nofields <address of _values>
Drop a line with your comments, suggestions or improvements.
//