RFR: 8229517: Support for optional asynchronous/buffered logging [v14]

Xin Liu xliu at openjdk.java.net
Fri May 21 02:58:37 UTC 2021


On Fri, 14 May 2021 04:19:49 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> enqueue_impl() is private. it's not accessible from outside. 
>> only public member functions can be seen by clients.
>
>> enqueue_impl() is private. it's not accessible from outside.
>> only public member functions can be seen by clients.
> 
> What I meant is, can logging - hence enqueing - be done from the async thread itself? Can it happen that the logger thread itself logs, would that be a problem, and if yes, should we guard against it?

Actually, it could happen. This line is the very first 'log' from AsyncLog Thread. 

  void pre_run() override {
    NonJavaThread::pre_run();
    log_debug(logging, thread)("starting AsyncLog Thread tid = " INTX_FORMAT, os::current_thread_id());
  }

This logsite is handled exactly same as other logsites. grab the lock, enqueue the cloned message and return -1.

-------------

PR: https://git.openjdk.java.net/jdk/pull/3135


More information about the hotspot-dev mailing list