what is "New objects" column

Questions about YourKit Java Profiler
Post Reply
vijaykrishna
Posts: 6
Joined: Fri Jul 08, 2005 7:59 am

what is "New objects" column

Post by vijaykrishna »

hi,
Please tell me when we make a comparision of snapshots we get an additional column called "New Objects" What is it .. ?
Kindly help.

thanks,
Vijay
Vladimir Kondratyev
Posts: 1626
Joined: Tue Aug 10, 2004 7:52 pm

Post by Vladimir Kondratyev »

These are new objects which present in newest snapshot and do not present in old one. This is very helpful information to find memory leaks.
vijaykrishna
Posts: 6
Joined: Fri Jul 08, 2005 7:59 am

Can you kindly explain..

Post by vijaykrishna »

Hello,

Here are some of the figures which I am not able to understand...

This is the old memory snapshot results.

Objects = 158
Retain Size = 62472

This is the latest memory snapshot results

Objects = 158
Retain Size = 62592

When I make a comparison I get....

Objects = 0
RetainSize = 0
NewObjects = 95
RetainSize Of NewObjects = 59728

why is the NewObjects given as 95...?
I am not able differentiate between NewObjects and Objects.

Thanks,
Vijay
vijaykrishna
Posts: 6
Joined: Fri Jul 08, 2005 7:59 am

Post by vijaykrishna »

Hi,
I was wondering that the Objects Column would show with a +/- some value and this indicates how many objects were created or destroyed...

Here is another stat...

Before :
Objects = 22415
Retain Size = 1871024

After :
Objects = 22402
Retain Size = 1870872

Compare :
Objects = -13
Retain Size = -152
New Objects = 1359
Retain Size of new objects = 94192

I would appreciate it if you could explain this one rather than the previous stats that i had posted...Thanks.

Regards,
Vijay
rblasch
Posts: 64
Joined: Mon Jan 10, 2005 7:13 pm

Post by rblasch »

I hope you don't mind thinking out loud here. Please feel free to tell me if you do.

In my opinion, "Objects" is the current number of objects, whereas "New Objects" are objects that were created after the last snapshot.

For example, if you have 1 object of class String. You make a snapshot. You get rid of the reference to it, the object gets garbage collected. Then you allocate another String. Again, a snapshot.
You still have 1 String allocated, so the Objects count is 1 in both. But also, 1 new String got created, that's the "New Objects" count.

Am I making any sense here?

Ron
Vladimir Kondratyev
Posts: 1626
Joined: Tue Aug 10, 2004 7:52 pm

Post by Vladimir Kondratyev »

Absolutely right
vijaykrishna
Posts: 6
Joined: Fri Jul 08, 2005 7:59 am

some more doubts

Post by vijaykrishna »

Hi,
So the New Objects are the objects that were created after the last snaphot and Objects are the ones that are currently alive...

Here is a LoadTest that I am performing...
(The following stats are from a single operation)

I took a snapshot after 3000 hits.. and another after 4250 hits...
when i make a comparison I get

New Objects = 2990
Objects = +41

I took another snapshot after 13000 hits and made a comparison with the one taken at 4250 and did a comparison I get

New Objects = 3351
Objects = +348

My doubt is if the New Objects column represents Objects that were created after the last snapshot it should have been around 2990 * 7 since the comparison was done after 7 folds gap of the previous comparison.

Does New Objects indicate the ones that got created and are alive since the last snapshot was taken ? Then what does Objects indicate ?


Thanks,
Vijay.
Post Reply