Currently, the debug pipeline wrappers look like: wrapper() { checkContext(); downstreamGL4bc.wrappedFunction(arg0,arg1,arg2...); String txt = new String("a large debug string + all args") checkGLError(txt); } Change to a format based string, and add a check-only fucntion to allow an allocation-free fastpath for the success cases: wrapper() { checkContext(); downstreamGL4bc.glShaderOp1EXT(arg0,arg1,arg2); int err = checkGLError(); if (err != GL_NO_ERROR) { writeGLError(err, "%s(<int> 0x%X, <int> 0x%X, <int> 0x%X)", "glShaderOp1EXT", arg0, arg1, arg2); } }