History log of /dalvik/vm/Init.h
Revision Date Author Comments
5719d5c79558ffdbbb863ddcf61836221aba922d 22-Jun-2011 Elliott Hughes <enh@google.com> Improve -verbose:jni.

The old output just told you what functions were being called and made no
attempt to show you their arguments. The new output was sufficient to debug
an actual problem with an app we don't have the source to.

Still to do:
0. an easier way for third-party developers to enable this.
1. the primitive type arguments to SetIntField and so forth.
2. return values.

A few examples of the new output...

A decoded jclass:
JNI: libcore.io.Posix.readBytes called IsInstanceOf((JNIEnv*)0x9618470, 0x28100015, java.lang.Class<byte[]>)

A decoded jfieldID:
JNI: libcore.io.Posix.ioctlInt called GetIntField((JNIEnv*)0x9618470, 0x5cb00011, java.io.FileDescriptor.descriptor)

A decoded jmethodID (the FileDescriptor constructor):
JNI: libcore.io.Posix.open called NewObject((JNIEnv*)0x9780480, java.lang.Class<java.io.FileDescriptor>, java.io.FileDescriptor.<init>()V, ...)

A const char*:
JNI: libcore.io.Posix.getsockoptLinger called NewStringUTF((JNIEnv*)0x9618470, "getsockopt")

A jint release mode:
JNI: libcore.io.Posix.writeBytes called ReleaseByteArrayElements((JNIEnv*)0x9780480, 0x2700009, (void*) 0xf5f623c4, JNI_ABORT)

The -verbose:jni option now turns on a bit more output about JNI_OnLoad calls
but no longer causes any logging of calls to JNIEnv or JavaVM functions. The
old -Xjnitrace: option has been extended to enable this new tracing for the
native methods that it covers. They go very well together for debugging
purposes.

I've also made us a bit more verbose if we fail to initialize. In the longer
term I think we want to just abort if we hit any failure during startup, but
my extra logging will save us a bit of time next time we have one of these
failures (this one was caused for me by only having one half of the finalizer
watchdog change; I was missing the libcore side).

(Cherry pick of 6734b8224fb869c94e42e704ec03f2ce8483af2b from dalvik-dev.)

Change-Id: I69b7620b20620e9f06576da244520d9d83f89ab8
375fb116bcb817b37509ab579dbd55cdbb765cbf 15-Jun-2011 Carl Shapiro <cshapiro@google.com> Normalize the include guard style.

An leading underscore followed by a capital letter is a reserved
name space in C and C++.

This change also moves any #include directives within the include
guard in some of the compiler/codegen/arm header files.

Change-Id: I9715e2c5301699d31886e61d0fe6e29483555a2a
d862faa2ceae186da5518607505eb942d634ced9 28-Apr-2011 Carl Shapiro <cshapiro@google.com> Get rid of uneeded extern, enum, typedef and struct qualifiers.

Change-Id: I236c5a1553a51f82c9bc3eaaab042046c854d3b4
b584d4abf22df78b1b24f3870ffc282ac7ff052e 14-Apr-2011 Dan Bornstein <danfuzz@android.com> Cleanup.

I have it on enthusiastic authority that the foreach would never have
any value, so away it goes. I got rid of the pointless re-init of
Class too.

Change-Id: I794d5f1286d7c240f7d17b24e1e9e8e93b87316a
ae188c676c681e47a93ade7fdf0144099b470e03 08-Apr-2011 Carl Shapiro <cshapiro@google.com> Compile the garbage collector and heap profiler as C++.

Change-Id: I25d8fa821987a3dd6d7109d07fd42dbf2fe0e589
c399ea527d0d50c6e2b4ae15fc4a3e9a18f3f1f1 22-Mar-2011 Dan Bornstein <danfuzz@android.com> Pull the globals iteration into InitRefs.

This gives the new GC a way to iterate over the global object refs
defined in Globals.h, without having to have detailed knowledge of the
list of such refs. However, this change doesn't actually modify the GC
code in question, since it is not currently in a working state anyway.

InitRefs.c probably wants a slightly different name. Suggestions welcome.

Bonus: Cleaned up a vaguely-related clause in Class.c.

Change-Id: I406987c56ddf310c61d877574071c46f3717fc72
40fcd04f6b2a776aae1d52d1a49e6652e735051f 10-Mar-2011 Dan Bornstein <danfuzz@android.com> Pull the Reference setup code into InitRefs.c.

The idea here is to make it obvious in the setup code that Reference
has to be set up specially, to make it less likely that it will get
erroneously combined with the other setup code in the future.

Since the class Reference itself isn't used, I took the opportunity
to just remove it from Globals.h.

Change-Id: I301c0ac2032e78e1e57cc3065eb0baa77f0d346f
3111b0c80ca3f90e966371cbab606ac38ed17cad 07-Mar-2011 Dan Bornstein <danfuzz@android.com> Collate more of the low-level class lookups.

I pulled out all the initialization code that I could find that was
merely looking up class and member names during early VM initialization,
putting them all in a new file, InitRefs.c. I didn't do any real restructuring
of the code, though. That will come in a follow-up.

This was instigated by discussion surrounding bug #3500987, but it's not
directly related to it.

Change-Id: I59e93e552d29a5518f2cc4e1e30c4a8d51750d7b
4b5fa2e50860015beebcc5fc3a33265b266d6d34 03-Mar-2011 Dan Bornstein <danfuzz@android.com> Clarify the ordering requirement.

Hopefully, future maintainers won't also have to spend a day or so
sorting out what's going on.

Bug: 3500987
Change-Id: I0a1041df9ed4992563bc9d882fa134e82829cf18
8521311b4e55847c650a87933d5a3f04618e4e69 02-Mar-2011 Dan Bornstein <danfuzz@android.com> Yak-shaving in support of the exception cleanup.

This change restructures where early class initialization happens in
the VM, moving a few chunks of it together into Init.c. The exception
classes get moved here as well as the super-core classes needed
particularly for dex optimization. This is all done to support a follow-up
change that will put more of the verifier's required exceptions into
the list. (Before this change, it would have been unsafe to do that.)

This change also paves the way for further consolidation of class and
member initialization, which I hope will make it easier to transition
the whole mess into the new copying-gc world, when that arrives on the
scene.

Bug: 3500987
Change-Id: I0caae09432a05287af53aa36a6663997ab310985
72e93344b4d1ffc71e9c832ec23de0657e5b04a5 13-Nov-2009 Jean-Baptiste Queru <jbq@google.com> eclair snapshot
99409883d9c4c0ffb49b070ce307bb33a9dfe9f1 19-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import //branches/master/...@140412
f6c387128427e121477c1b32ad35cdcaa5101ba3 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
f72d5de56a522ac3be03873bdde26f23a5eeeb3c 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
5d709784bbf5001012d7f25172927d46f6c1abe1 11-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@130745
89c1feb0a69a7707b271086e749975b3f7acacf7 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
2ad60cfc28e14ee8f0bb038720836a4696c478ad 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution