开发者

What do the columns in the Object Alloc instrument mean?

开发者 https://www.devze.com 2022-12-29 20:43 出处:网络
I was unable to find the documentation for this. There is no Quick Info. The columns have these opaque titles:

I was unable to find the documentation for this. There is no Quick Info.

The columns have these opaque titles:

Category

Live Bytes

# Living

# Transitory

Overall Bytes

# Overall

# Allocations (Net / Overall)

Is there a document that shows what these columns mean? Wi开发者_开发百科thout having to read 600 pages?


The "Analyzing Data with the ObjectAlloc Instrument" section of the Instruments User Guide used to provide some description of the detail view for this instrument (the whole guide has since been rewritten):

The Detail pane (while it is in Table mode) displays other useful information to help you spot potential allocation issues. The net versus overall allocations column of the table shows a histogram of the currently active objects and the total number that were ever created. As the ratio of net allocations to overall allocations shrinks, the color of the histogram bar changes. Blue histogram bars represent a reasonable ratio while colors shifted towards the red spectrum represent lower ratios that might warrant some investigation.

Object allocations are grouped by type, which is what appears under the Category header. The Live Bytes column indicates how many of this type of object have been allocated and still are around in memory. Likewise, the # Living column tells you how many objects of this type are still around in memory. The Overall Bytes and # Overall columns show the total size in memory and number of all allocated objects of that type, whether or not they are still around in memory at this time. Finally, the # Transitory is simply the difference between # Living and # Overall, showing how many objects of that type were created and destroyed during the time period you are analyzing.

The histogram at the right of this table is described by the above-quoted section from the documentation, but it simply provides a graphical measure of the numbers described above.


Here's some more information on Instruments... The link in the approved answer's link reroute doesn't work.

https://developer.apple.com/library/mac/#documentation/developertools/conceptual/InstrumentsUserGuide/Built-InInstruments/Built-InInstruments.html

This also breaks down what the colors of the bars mean...

*Scroll down about half way to the Allocations section.

[updated link, you should be able to find the info in here.]

https://developer.apple.com/library/mac/#documentation/developertools/conceptual/InstrumentsUserGuide/Introduction/Introduction.html


See Allocations Instrument

Live Bytes

The number of bytes that have been allocated, but not released.

Living

The number of objects created and still on the heap.

Transitory

The number of objects that were created and destroyed in the selected time range. Overall Bytes The total number of bytes of this type that have been allocated, including those that have been released.

Overall

The total number of objects or memory blocks of this type that have been allocated, including those that have been released.

Allocations (Net / Overall)

A histogram of the current and total accounts.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号