Path: blob/master/src/hotspot/share/runtime/jniPeriodicChecker.hpp
40951 views
/*1* Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*22*/2324#ifndef SHARE_RUNTIME_JNIPERIODICCHECKER_HPP25#define SHARE_RUNTIME_JNIPERIODICCHECKER_HPP2627class JniPeriodicCheckerTask;2829/*30* This gets activated under Xcheck:jni (CheckJNICalls), and is typically31* to detect any errors caused by JNI applications, such as signal handler,32* hijacking, va 0x0 hijacking either by mmap or an OS error.33*/343536class JniPeriodicChecker : AllStatic {3738friend class JniPeriodicCheckerTask;3940private:41static JniPeriodicCheckerTask* _task;4243public:44// Start/stop task45static void engage();46static void disengage();4748static bool is_active() { return _task != NULL; }4950static void initialize();51static void destroy();52};5354void jniPeriodicChecker_exit();5556#endif // SHARE_RUNTIME_JNIPERIODICCHECKER_HPP575859