- if (__builtin_expect (_Jv_JVMPI_Notify_OBJECT_ALLOC != 0, false))
- {
- JVMPI_Event event;
-
- event.event_type = JVMPI_EVENT_OBJECT_ALLOC;
- event.env_id = NULL;
- event.u.obj_alloc.arena_id = 0;
- event.u.obj_alloc.class_id = (jobjectID) klass;
- event.u.obj_alloc.is_array = 0;
- event.u.obj_alloc.size = size;
- event.u.obj_alloc.obj_id = (jobjectID) obj;
-
- // FIXME: This doesn't look right for the Boehm GC. A GC may
- // already be in progress. _Jv_DisableGC () doesn't wait for it.
- // More importantly, I don't see the need for disabling GC, since we
- // blatantly have a pointer to obj on our stack, ensuring that the
- // object can't be collected. Even for a nonconservative collector,
- // it appears to me that this must be true, since we are about to
- // return obj. Isn't this whole approach way too intrusive for
- // a useful profiling interface? - HB
- _Jv_DisableGC ();
- (*_Jv_JVMPI_Notify_OBJECT_ALLOC) (&event);
- _Jv_EnableGC ();
- }
+ JVMPI_Event event;
+
+ event.event_type = JVMPI_EVENT_OBJECT_ALLOC;
+ event.env_id = NULL;
+ event.u.obj_alloc.arena_id = 0;
+ event.u.obj_alloc.class_id = (jobjectID) klass;
+ event.u.obj_alloc.is_array = 0;
+ event.u.obj_alloc.size = size;
+ event.u.obj_alloc.obj_id = (jobjectID) obj;
+
+ // FIXME: This doesn't look right for the Boehm GC. A GC may
+ // already be in progress. _Jv_DisableGC () doesn't wait for it.
+ // More importantly, I don't see the need for disabling GC, since we
+ // blatantly have a pointer to obj on our stack, ensuring that the
+ // object can't be collected. Even for a nonconservative collector,
+ // it appears to me that this must be true, since we are about to
+ // return obj. Isn't this whole approach way too intrusive for
+ // a useful profiling interface? - HB
+ _Jv_DisableGC ();
+ (*_Jv_JVMPI_Notify_OBJECT_ALLOC) (&event);
+ _Jv_EnableGC ();