< prev index next >

src/os/windows/vm/os_windows.hpp

Print this page
rev 8957 : 8223147: JFR Backport
8199712: Flight Recorder
8203346: JFR: Inconsistent signature of jfr_add_string_constant
8195817: JFR.stop should require name of recording
8195818: JFR.start should increase autogenerated name by one
8195819: Remove recording=x from jcmd JFR.check output
8203921: JFR thread sampling is missing fixes from JDK-8194552
8203929: Limit amount of data for JFR.dump
8203664: JFR start failure after AppCDS archive created with JFR StartFlightRecording
8003209: JFR events for network utilization
8207392: [PPC64] Implement JFR profiling

*** 109,118 **** --- 109,140 ---- * To be able to use this - don't take locks, don't rely on destructors, * don't make OS library calls, don't allocate memory, don't print, * don't call code that could leave the heap / memory in an inconsistent state, * or anything else where we are not in control if we suddenly jump out. */ + class ThreadCrashProtection : public StackObj { + public: + static bool is_crash_protected(Thread* thr) { + return _crash_protection != NULL && _protected_thread == thr; + } + + ThreadCrashProtection(); + bool call(os::CrashProtectionCallback& cb); + private: + static Thread* _protected_thread; + static ThreadCrashProtection* _crash_protection; + static volatile intptr_t _crash_mux; + }; + + /* + * Crash protection for the watcher thread. Wrap the callback + * with a __try { call() } + * To be able to use this - don't take locks, don't rely on destructors, + * don't make OS library calls, don't allocate memory, don't print, + * don't call code that could leave the heap / memory in an inconsistent state, + * or anything else where we are not in control if we suddenly jump out. + */ class WatcherThreadCrashProtection : public StackObj { public: WatcherThreadCrashProtection(); bool call(os::CrashProtectionCallback& cb); };
< prev index next >