{"record":{"id":"25beaf01ee873bbb","repo":"oracle/graal","slug":"error-destroying-event-set-d-s","errorCode":null,"errorMessage":"Error destroying event set %d: %s\n","messagePattern":"Error destroying event set (.+?): (.+?)\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"compiler/src/org.graalvm.papibridge/src/papibridge.c","lineNumber":110,"sourceCode":"\n/**\n * Cleans up and destroys the specified PAPI event set.\n *\n * @param env The JNI environment.\n * @param cls The Java class that this native method belongs to.\n * @param eventset The handle of the event set to be cleaned up and destroyed.\n *\n * @return JNI_TRUE if the operation is successful, JNI_FALSE otherwise.\n */\nJNIEXPORT jboolean JNICALL Java_jdk_graal_compiler_hotspot_replaycomp_HardwarePerformanceCounters_cleanAndDestroyEventSet(JNIEnv *env, jclass cls,\n                                                                                                                          jint eventset) {\n    int retval = 0;\n    if ((retval = PAPI_cleanup_eventset(eventset)) != PAPI_OK) {\n        fprintf(stderr, \"Error cleaning up event set %d: %s\\n\", eventset, PAPI_strerror(retval));\n        return JNI_FALSE;\n    }\n    if ((retval = PAPI_destroy_eventset(&eventset)) != PAPI_OK) {\n        fprintf(stderr, \"Error destroying event set %d: %s\\n\", eventset, PAPI_strerror(retval));\n        return JNI_FALSE;\n    }\n    return JNI_TRUE;\n}\n\n/**\n * Starts the measurements for the specified PAPI event set.\n *\n * @param env The JNI environment.\n * @param cls The Java class that this native method belongs to.\n * @param eventset The handle of the event set to be started.\n *\n * @return JNI_TRUE if the operation is successful, JNI_FALSE otherwise.\n */\nJNIEXPORT jboolean JNICALL Java_jdk_graal_compiler_hotspot_replaycomp_HardwarePerformanceCounters_start(JNIEnv *env, jclass cls, jint eventset) {\n    int retval = PAPI_start(eventset);\n    if (retval != PAPI_OK) {\n        fprintf(stderr, \"Error starting measurements for event set %d: %s\\n\", eventset, PAPI_strerror(retval));","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/compiler/src/org.graalvm.papibridge/src/papibridge.c#L92-L128","documentation":"Error \"Error destroying event set %d: %s\n\" thrown in oracle/graal.","triggerScenarios":"Thrown at compiler/src/org.graalvm.papibridge/src/papibridge.c:110 when the library encounters an invalid state.","commonSituations":"Occurs when a caller violates the contract guarded by this check: Error destroying event set {}: {}","solutions":["Fix the condition reported by the error: Error destroying event set {}: {}","Check the throwing call site and ensure its documented preconditions (argument values, types, environment, or configuration) are satisfied before the call."],"exampleFix":"Validate inputs and environment so that the failing condition does not occur: Error destroying event set {}: {}","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}