activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From franz1981 <>
Subject [GitHub] activemq-artemis pull request #1295: ARTEMIS-1185 Inter-Process Journal Samp...
Date Tue, 30 May 2017 06:59:07 GMT
Github user franz1981 commented on a diff in the pull request:
    --- Diff: artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/buffer/
    @@ -93,10 +82,10 @@
        public TimedBuffer(final int size, final int timeout, final boolean logRates) {
           bufferSize = size;
    -      this.logRates = logRates;
           if (logRates) {
    -         logRatesTimer = new Timer(true);
    +         this.flushProfiler = Profiler.instrumented();
    +      } else {
    +         this.flushProfiler = Profiler.none();
    --- End diff --
    About the compiler we're "lucky", because the noop impl will be inlined (is monomorphic
with no code inside) and then wiped away (verified using JitWatch), leaving the TimedBuffer
clean and without null checks too.
    The guard statement that can be compiled out AFAIK are the ones that rely on final static
fields, while normal instance members do not receive the same treatment from the JIT, sadly.
    It is a different coding style: like having a null logger instance member or a noop logger

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message