Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion make/autoconf/flags-cflags.m4
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
TOOLCHAIN_CFLAGS_JVM="-qtbtable=full -qtune=balanced -fno-exceptions \
-qalias=noansi -qstrict -qtls=default -qnortti -qnoeh -qignerrno -qstackprotect"
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
TOOLCHAIN_CFLAGS_JVM="-nologo -MD -Zc:preprocessor -Zc:strictStrings -MP"
TOOLCHAIN_CFLAGS_JVM="-nologo -MD -Zc:preprocessor -Zc:strictStrings -MP -GR-"
TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:preprocessor -Zc:strictStrings -Zc:wchar_t-"
fi

Expand Down
8 changes: 7 additions & 1 deletion src/hotspot/share/runtime/notificationThread.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,17 @@ class NotificationThread : public JavaThread {
private:

static void notification_thread_entry(JavaThread* thread, TRAPS);
NotificationThread(ThreadFunction entry_point) : JavaThread(entry_point) {};
NotificationThread(ThreadFunction entry_point) : JavaThread(entry_point) {}

public:
static void initialize();

// Serviceability Agent relies on being able to identify types based on their vtable address. If
// we do not override any virtual methods and RTTI is disabled, MSVC may emit a single vtable for
// JavaThread and NotificationThread. This results in the vtable symbols for both classes pointing
// to the same address, and Serviceability Agent thinking all JavaThreads are NotificationThreads. So
// while this method is not directly used anywhere, it must exist.
bool is_Notification_thread() const override { return true; }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than adding this method, would it be sufficient to explicitly define ~NotificationThread()?
Might require making it non-trivial. The comment would still be needed.

};

#endif // SHARE_RUNTIME_NOTIFICATIONTHREAD_HPP
1 change: 1 addition & 0 deletions src/hotspot/share/runtime/thread.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ class Thread: public ThreadShadow {
virtual bool is_Named_thread() const { return false; }
virtual bool is_Worker_thread() const { return false; }
virtual bool is_JfrSampler_thread() const { return false; }
virtual bool is_Notification_thread() const { return false; }

// Can this thread make Java upcalls
virtual bool can_call_java() const { return false; }
Expand Down
Loading