--- old/src/share/vm/utilities/vmError.hpp 2017-02-06 12:02:34.274558000 +0100 +++ new/src/share/vm/utilities/vmError.hpp 2017-02-06 12:02:34.072552000 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -74,6 +74,16 @@ // no core/minidump has been written to disk static char coredump_message[O_BUFLEN]; + // Timeout handling: + // Timestamp at which error reporting started; -1 if no error reporting in progress. + static volatile jlong _reporting_start_time; + // Whether or not error reporting did timeout. + static volatile bool _reporting_did_timeout; + // Timestamp at which the last error reporting step started; -1 if no error reporting + // in progress. + static volatile jlong _step_start_time; + // Whether or not the last error reporting step did timeout. + static volatile bool _step_did_timeout; // set signal handlers on Solaris/Linux or the default exception filter // on Windows, to handle recursive crashes. @@ -104,10 +114,20 @@ static fdStream out; static fdStream log; // error log used by VMError::report_and_die() - // Platform dependend helper functions used for timeout handling. + // Timeout handling. + // Hook functions for platform dependend functionality: static void reporting_started(); static void interrupt_reporting_thread(); + // Helper function to get the current timestamp. + static jlong get_current_timestamp(); + + // Accessors to get/set the start times for step and total timeout. + static void record_reporting_start_time(); + static jlong get_reporting_start_time(); + static void record_step_start_time(); + static jlong get_step_start_time(); + public: // return a string to describe the error @@ -152,8 +172,8 @@ static intptr_t get_first_error_tid() { return first_error_tid; } - // Called by WatcherThread to check if the currently running error reporting did timeout. - // Returns true if reporting did hit the global ErrorLogTimeout. + // Called by the WatcherThread to check if error reporting has timed-out. + // Returns true if error reporting has not completed within the ErrorLogTimeout limit. static bool check_timeout(); };