Beispiel #1
0
static void test_init()
{
    int proc_number = port_CPUs_number();
    GC_REQUEST_THREAD_COUNT = ((proc_number * 3 + 1) / 2) - 2;
    if (GC_REQUEST_THREAD_COUNT <= 0) {
        GC_REQUEST_THREAD_COUNT = 1;
    }
    JAVA_REQUEST_THREAD_COUNT = 2;
} // test_init
Beispiel #2
0
/*
 * Get Available Processors
 *
 * Returns the number of processors available to the Java virtual
 * machine.
 *
 * REQUIRED Functionality.
 */
jvmtiError JNICALL
jvmtiGetAvailableProcessors(jvmtiEnv* env,
                            jint* processor_count_ptr)
{
    TRACE2("jvmti.timer", "GetAvailableProcessors called");
    SuspendEnabledChecker sec;
    /*
     * Check given env & current phase.
     */
    jvmtiPhase* phases = NULL;

    CHECK_EVERYTHING();

    if (processor_count_ptr == NULL)
    {
        return JVMTI_ERROR_NULL_POINTER;
    }

    *processor_count_ptr = port_CPUs_number();

    return JVMTI_ERROR_NONE;
}
Beispiel #3
0
static void test_init()
{
    int proc_number = port_CPUs_number();
    GC_REQUEST_THREAD_COUNT = (proc_number * 3 + 1) / 2;
    JAVA_REQUEST_THREAD_COUNT = 0;
} // test_init