Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the implications of VMDebug.startGC in a traceview file

Tags:

android

What are the implications of VMDebug.startGC in a traceview file

The documentation says:

/*
 * Fake method, inserted into dmtrace output when the garbage collector
 * runs.  Not actually called.
 */

private static void startGC() {}

But in my traceview I see something like this: traceview

Mousing over the brown squares indicates that they are VMDebug.startGC() methods with each method taking roughly 17 real ms. The green squares are BitmapFactory.nativeDecodeAssetFunctions, they each take about 26 real millseconds. In this segment of code I am loading bitmaps for import as openGL textures.

What is the startGC() function?

I have a belief based on the function name and observing when its called that its somehow related to garbage collection, but the documentation contradicts me.

like image 462
tjb Avatar asked Jun 07 '12 08:06

tjb


Video Answer


1 Answers

You have copied and pasted doc description for startClassPrep() method wich is below startGC() in the sources.

Real description is:

/*
 * Fake method, inserted into dmtrace output when the garbage collector
 * runs.  Not actually called.
 */
private static void startGC() {}

It looks that the method is used only for debug purpose while running traceview.

like image 120
pawelzieba Avatar answered Nov 09 '22 03:11

pawelzieba