Hi all
I found that there are conservative scan and type precise scan when
garbage collector scan the thread stack.
Then I turn on the precise scan in the dalvim vm by adding some code
in
"frameworks/base/core/jni/AndroidRuntime.cpp"
opt.optionString = "-Xgenregmap";
mOptions.add(opt);
/* turn on precise GC while we're at it */
opt.optionString = "-Xgc:precise";
mOptions.add(opt);
It surely assigns true to "gDvm.preciseGc" and "generateRegisterMaps"
when the dalvik startup.
However, in the function "gcScanInterpStackReferences" in "dalvik/vm/
Thread.c",
the variable "const RegisterMap* pMap" always gets "null" when the
program executes:
"pMap = dvmGetExpandedRegisterMap(nonConstMethod);".
Therefore, it always falls back to conservative scan.
Did someone has made the dalvik scan the stack frame precisely?
If so, teach me how to do it, please.
It's very urgent.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en