< prev index next >

src/share/back/eventHandler.c

Print this page
rev 13726 : 8227269: Slow class loading when running JVM in debug mode


1611 }
1612 
1613 
1614 static jvmtiError
1615 installHandler(HandlerNode *node,
1616               HandlerFunction func,
1617               jboolean external)
1618 {
1619     jvmtiError error;
1620 
1621     if ( func == NULL ) {
1622         return AGENT_ERROR_INVALID_EVENT_TYPE;
1623     }
1624 
1625     debugMonitorEnter(handlerLock);
1626 
1627     HANDLER_FUNCTION(node) = func;
1628 
1629     node->handlerID = external? ++requestIdCounter : 0;
1630     error = eventFilterRestricted_install(node);



1631     if (error == JVMTI_ERROR_NONE) {
1632         insert(getHandlerChain(node->ei), node);
1633     }
1634 
1635     debugMonitorExit(handlerLock);
1636 
1637     return error;
1638 }
1639 
1640 static HandlerNode *
1641 createInternal(EventIndex ei, HandlerFunction func,
1642                jthread thread, jclass clazz, jmethodID method,
1643                jlocation location, jboolean permanent)
1644 {
1645     jint index = 0;
1646     jvmtiError error = JVMTI_ERROR_NONE;
1647     HandlerNode *node;
1648 
1649     /*
1650      * Start with necessary allocations




1611 }
1612 
1613 
1614 static jvmtiError
1615 installHandler(HandlerNode *node,
1616               HandlerFunction func,
1617               jboolean external)
1618 {
1619     jvmtiError error;
1620 
1621     if ( func == NULL ) {
1622         return AGENT_ERROR_INVALID_EVENT_TYPE;
1623     }
1624 
1625     debugMonitorEnter(handlerLock);
1626 
1627     HANDLER_FUNCTION(node) = func;
1628 
1629     node->handlerID = external? ++requestIdCounter : 0;
1630     error = eventFilterRestricted_install(node);
1631     if (node->ei == EI_GC_FINISH) {
1632         classTrack_activate(getEnv());
1633     }
1634     if (error == JVMTI_ERROR_NONE) {
1635         insert(getHandlerChain(node->ei), node);
1636     }
1637 
1638     debugMonitorExit(handlerLock);
1639 
1640     return error;
1641 }
1642 
1643 static HandlerNode *
1644 createInternal(EventIndex ei, HandlerFunction func,
1645                jthread thread, jclass clazz, jmethodID method,
1646                jlocation location, jboolean permanent)
1647 {
1648     jint index = 0;
1649     jvmtiError error = JVMTI_ERROR_NONE;
1650     HandlerNode *node;
1651 
1652     /*
1653      * Start with necessary allocations


< prev index next >