Re: Deep Dive into Java 9’s Stack-Walking API

2017-04-03 Thread Gary Gregory
On a biz trip to the NL for a week, then a vacation to the UK and France for two weeks ;-) G On Apr 2, 2017 10:35 PM, "Ralph Goers" wrote: > Where have you been? I posted performance benchmarks based on that a week > or two ago. See all my updates to LOG4J2-1359. >

Re: Deep Dive into Java 9’s Stack-Walking API

2017-04-02 Thread Ralph Goers
Where have you been? I posted performance benchmarks based on that a week or two ago. See all my updates to LOG4J2-1359. I have already implemented StackWalker support on branch java9NoMultiRelease. I started on a branch for LOG4J2-1359 but trouble with the Multi-Release jar made me rethink

[jira] [Commented] (LOG4J2-1359) Add support for Java 9 StackWalker API in ReflectionUtil

2017-04-02 Thread ASF subversion and git services (JIRA)
34552d7d725c3b7547e1c19f6ce803b83c60bd94 in logging-log4j2's branch refs/heads/java9NoMultiRelease from [~ralph_go...@dslextreme.com] [ https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;h=34552d7 ] LOG4J2-1359 - Set up for modules. Do not use multi-release jars > Add support for Java 9 StackWal

Deep Dive into Java 9’s Stack-Walking API

2017-04-02 Thread Gary Gregory
FYI: https://www.sitepoint.com/deep-dive-into-java-9s-stack-walking-api/ Gary -- E-Mail: garydgreg...@gmail.com | ggreg...@apache.org Java Persistence with Hibernate, Second Edition

Re: Java 9 support

2017-03-19 Thread Ralph Goers
I opened https://issues.apache.org/jira/browse/FELIX-5527 <https://issues.apache.org/jira/browse/FELIX-5527>. Apparently the problem is with bnd-tools who seem to be ignoring the problem because Java 9 isn’t final. Since OSGi bundles don’t or won’t have support for multi-releas

[jira] [Commented] (LOG4J2-1359) Add support for Java 9 StackWalker API in ReflectionUtil

2017-03-19 Thread Ralph Goers (JIRA)
use a "service" for the replaceable functionality, which I take to mean that the ServiceLoader should be used. I'll have to dwell on the issues in doing that. > Add support for Java 9 StackWalker API in R

[jira] [Comment Edited] (LOG4J2-1359) Add support for Java 9 StackWalker API in ReflectionUtil

2017-03-19 Thread Ralph Goers (JIRA)
are the results of the benchmarks. Overall, it seems that most of the tests are a bit slower in Java 9. Serializing an Event that has an Exception is a LOT slower, which is probably a result of the performance regression I already reported. However, getting the location information takes about 1/3

[jira] [Commented] (LOG4J2-1359) Add support for Java 9 StackWalker API in ReflectionUtil

2017-03-19 Thread Ralph Goers (JIRA)
that most of the tests are a bit slower in Java 9. Serializing an Event that has an Exception is a LOT slower, which is probably a result of the performance regression I already reported. However, getting the location information takes about 1/3 the time it did in Java 7. I don't understand

[jira] [Commented] (LOG4J2-1359) Add support for Java 9 StackWalker API in ReflectionUtil

2017-03-19 Thread ASF subversion and git services (JIRA)
311101cb47594a4bc781a5365a471d5be7f40647 in logging-log4j2's branch refs/heads/LOG4J2-1359 from [~ralph_go...@dslextreme.com] [ https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;h=311101c ] LOG4J2-1359 - Remove print statement > Add support for Java 9 StackWalker API in ReflectionU

[jira] [Commented] (LOG4J2-1359) Add support for Java 9 StackWalker API in ReflectionUtil

2017-03-19 Thread ASF subversion and git services (JIRA)
8eac91024cce617b15838c1f630d8aa32703c6f3 in logging-log4j2's branch refs/heads/LOG4J2-1359 from [~ralph_go...@dslextreme.com] [ https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;h=8eac910 ] LOG4J2-1359 - Benchmark impact on LogEvent > Add support for Java 9 StackWalker API in ReflectionU

[jira] [Commented] (LOG4J2-1359) Add support for Java 9 StackWalker API in ReflectionUtil

2017-03-18 Thread Ralph Goers (JIRA)
install Java 9 and create a toolchains.xml that points to it. I have created a Jenkins job that verifies the build works in Jenkins (obviously). The only thing I don't like is that the toolchains.xml file has to be updated to point to the latest java 9 install. For some reason there is no symlink

[jira] [Comment Edited] (LOG4J2-1359) Add support for Java 9 StackWalker API in ReflectionUtil

2017-03-18 Thread Ralph Goers (JIRA)
created branch LOG4J2-1359. To build Log4j you must install Java 9 and create a toolchains.xml that points to it. I have created a Jenkins job that verifies the build works in Jenkins (obviously). The only thing I don't like is that the toolchains.xml file has to be updated to point to the latest

[jira] [Commented] (LOG4J2-1359) Add support for Java 9 StackWalker API in ReflectionUtil

2017-03-18 Thread ASF subversion and git services (JIRA)
e6ce8e4e137f00e9c3ab2f341dfda03c1f76a88a in logging-log4j2's branch refs/heads/LOG4J2-1359 from [~ralph_go...@dslextreme.com] [ https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;h=e6ce8e4 ] LOG4J2-1359 - Ignore javadoc problems in core due to Java 9 classes. Modify build instructions > Add supp

[jira] [Commented] (LOG4J2-1359) Add support for Java 9 StackWalker API in ReflectionUtil

2017-03-18 Thread ASF subversion and git services (JIRA)
4e44466fddb33da1835d82f44a538277741b9156 in logging-log4j2's branch refs/heads/LOG4J2-1359 from [~ralph_go...@dslextreme.com] [ https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;h=4e44466 ] LOG4J2-1359 - Remove profiles > Add support for Java 9 StackWalker API in ReflectionU

[jira] [Commented] (LOG4J2-1359) Add support for Java 9 StackWalker API in ReflectionUtil

2017-03-18 Thread ASF subversion and git services (JIRA)
0854d32523cc2f244a0ed9a927154dadfbf9534e in logging-log4j2's branch refs/heads/LOG4J2-1359 from [~ralph_go...@dslextreme.com] [ https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;h=0854d32 ] LOG4J2-1359 - Java 9 support > Add support for Java 9 StackWalker API in ReflectionU

Re: Java 9 support

2017-03-16 Thread Matt Sicker
ugh. Then again, I have no > idea if OSGi will support multi-release jars. > > Ralph > > On Mar 15, 2017, at 11:36 PM, Ralph Goers <ralph.go...@dslextreme.com> > wrote: > > I have built the Java 9 code. Now I am copying the classes into the > log4j-api jar. They h

Re: Java 9 support

2017-03-16 Thread Ralph Goers
017, at 11:36 PM, Ralph Goers <ralph.go...@dslextreme.com> wrote: > > I have built the Java 9 code. Now I am copying the classes into the log4j-api > jar. They have to be placed at META-INF/versions/9. However, when I do this I > am getting an error from the Maven bund

Re: Java 9 support

2017-03-16 Thread Ralph Goers
I have built the Java 9 code. Now I am copying the classes into the log4j-api jar. They have to be placed at META-INF/versions/9. However, when I do this I am getting an error from the Maven bundle plugin. [INFO] --- maven-bundle-plugin:3.2.0:manifest (default) @ log4j-api --- [ERROR] Manifest

Re: Java 9 support

2017-03-15 Thread Ralph Goers
I don’t see a problem with it. What is released will still run fine on Java 7. It will just have some Java 9 components in the jar. The release is scheduled for late July. I haven’t seen any indication that it will be pushed again. I would rather be ready to take advantage of Java 9 on the day

Re: Java 9 support

2017-03-15 Thread Mikael Ståldal
It would be bad to require Java 9 to build the main project as long as Java 9 is not released. On Wed, Mar 15, 2017 at 4:27 PM, Ralph Goers <ralph.go...@dslextreme.com> wrote: > I can’t change the JDK from JDK 1.7. The rest of the build must be > compiled at Java 7 since that is wha

Re: Java 9 support

2017-03-15 Thread Ralph Goers
I can’t change the JDK from JDK 1.7. The rest of the build must be compiled at Java 7 since that is what we support. I only want to compile the new classes with Java 9. Using a profile is a very good solution. We would have to run the build twice but that would be OK. I will give that a try

Re: Java 9 support

2017-03-15 Thread Remko Popma
Sorry, no idea. A separate repo sounds cleaner, but I haven't spent as much time as you thinking about this, so perhaps I'm wrong. It would be nice to not require Java 9 unless you want to compile the StackWalker stuff... On Thu, Mar 16, 2017 at 12:07 AM, Ralph Goers <ralph.go...@dslextreme.

Re: Java 9 support

2017-03-15 Thread Matt Sicker
March 2017 at 10:07, Ralph Goers <ralph.go...@dslextreme.com> wrote: > I know how to implement the StackWalker code but I don’t quite know how to > get it into the build. The main build needs to keep using Java 7 but of > course the StackWalker stuff needs to be compiled with Java 9. T

Java 9 support

2017-03-15 Thread Ralph Goers
I know how to implement the StackWalker code but I don’t quite know how to get it into the build. The main build needs to keep using Java 7 but of course the StackWalker stuff needs to be compiled with Java 9. Technically, I know how I could do that except I have no idea how it would work

[jira] [Comment Edited] (LOG4J2-1359) Add support for Java 9 StackWalker API in ReflectionUtil

2017-03-14 Thread Ralph Goers (JIRA)
ort for Java 9 StackWalker API in ReflectionUtil > > > Key: LOG4J2-1359 > URL: https://issues.apache.org/jira/browse/LOG4J2-1359 > Project: Log4j 2 > Issue Type: Improvement

[jira] [Commented] (LOG4J2-1359) Add support for Java 9 StackWalker API in ReflectionUtil

2017-03-14 Thread Ralph Goers (JIRA)
in ReflectionUtil and calcLocation in Log4jLogEvent. > Add support for Java 9 StackWalker API in ReflectionUtil > > > Key: LOG4J2-1359 > URL: https://issues.apache.org/jira/browse/LOG4J2-1359 >

[jira] [Commented] (LOG4J2-1359) Add support for Java 9 StackWalker API in ReflectionUtil

2017-03-14 Thread Matt Sicker (JIRA)
the StackWalker API in, for example, LogManager and ClassLoaderContextSelector, or does it still perform well when wrapped by ReflectionUtil (and thus requiring an additional stack frame)? If it's the former, then we're going to end up with several classes with Java 9 specific versions in the multi

[jira] [Commented] (LOG4J2-1359) Add support for Java 9 StackWalker API in ReflectionUtil

2017-03-13 Thread Ralph Goers (JIRA)
/A N/A avgt 20 35.724 ± 0.123 us/op StackWalkerVsExceptionBenchmark.stackwalkerStackTrace N/A N/A avgt 20 3.763 ± 0.022 us/op{code} > Add support for Java 9 StackWalker API in ReflectionU

[jira] [Commented] (LOG4J2-1359) Add support for Java 9 StackWalker API in ReflectionUtil

2017-03-13 Thread Ralph Goers (JIRA)
in the original tests and I will fix it there as well. > Add support for Java 9 StackWalker API in ReflectionUtil > > > Key: LOG4J2-1359 > URL: https://issues.apache.org/jira/browse/LOG4J2-1359 >

[jira] [Commented] (LOG4J2-1359) Add support for Java 9 StackWalker API in ReflectionUtil

2017-03-13 Thread Mandy Chung (JIRA)
recent frame and determine any performance improvement. > Add support for Java 9 StackWalker API in ReflectionUtil > > > Key: LOG4J2-1359 > URL: https://issues.apache.org/jira/bro

[jira] [Commented] (LOG4J2-1359) Add support for Java 9 StackWalker API in ReflectionUtil

2017-03-13 Thread Ralph Goers (JIRA)
issue and pointed them to my benchmark project. I have not heard anything yet. Of course, it could be possible that there is something wrong with the benchmark code. > Add support for Java 9 StackWalker API in ReflectionU

[jira] [Commented] (LOG4J2-1359) Add support for Java 9 StackWalker API in ReflectionUtil

2017-03-13 Thread Matt Sicker (JIRA)
lists, too? In order to access sun.reflect in Java 9, I think we'll have to add some compilation flags as they're trying to hide all their internal APIs that have public equivalents. > Add support for Java 9 StackWalker API in ReflectionU

[jira] [Comment Edited] (LOG4J2-1359) Add support for Java 9 StackWalker API in ReflectionUtil

2017-03-12 Thread Ralph Goers (JIRA)
is significantly faster in Java 8 than Java 9, so my memory is correct. 2. Using StackWalker to get the StackTraceElements is almost twice as slow as walking the Throwable in Java 8. 3. Using StackWalker to search for the caller's class is about twice as slow as sun.reflect.Reflection.getCallerClass

[jira] [Comment Edited] (LOG4J2-1359) Add support for Java 9 StackWalker API in ReflectionUtil

2017-03-12 Thread Ralph Goers (JIRA)
is significantly faster in Java 8 than Java 9, so my memory is correct. 2. Using StackWalker to get the StackTraceElements is almost twice as slow as walking the Throwable in Java 8. 3. Using StackWalker to search for the caller's class is about twice as slow as sun.reflect.Reflection.getCallerClass

[jira] [Comment Edited] (LOG4J2-1359) Add support for Java 9 StackWalker API in ReflectionUtil

2017-03-12 Thread Ralph Goers (JIRA)
is significantly faster in Java 8 than Java 9, so my memory is correct. 2. Using StackWalker to get the StackTraceElements is almost twice as slow as walking the Throwable in Java 8. 3. Using StackWalker to search for the caller's class is about twice as slow as sun.reflect.Reflection.getCallerClass

[jira] [Comment Edited] (LOG4J2-1359) Add support for Java 9 StackWalker API in ReflectionUtil

2017-03-12 Thread Ralph Goers (JIRA)
is significantly faster in Java 8 than Java 9, so my memory is correct. 2. Using StackWalker to get the StackTraceElements is almost twice as slow as walking the Throwable in Java 8. 3. Using StackWalker to search for the caller's class is about twice as slow as sun.reflect.Reflection.getCallerClass

[jira] [Commented] (LOG4J2-1359) Add support for Java 9 StackWalker API in ReflectionUtil

2017-03-12 Thread Ralph Goers (JIRA)
and modified them slightly and added benchmarks for java 8. The project is at https://github.com/rgoers/stackwalker-vs-Reflection_getCallerClass. The results on my machine are below. The take-aways are: 1. Walking the Throwable StackTraceElements is significantly faster in Java 8 than Java 9, so my

[jira] [Commented] (LOG4J2-1359) Add support for Java 9 StackWalker API in ReflectionUtil

2017-03-11 Thread Ralph Goers (JIRA)
9 than in Java 8. However, the openjdk devs believe I did something wrong. The only way to know is to test it. I plan to do just that by starting with https://github.com/pingtimeout/stack-walker-benchmark and then creating a Java 8 version and a Java 9 version. So yes, we can defer walking

[jira] [Comment Edited] (LOG4J2-1359) Add support for Java 9 StackWalker API in ReflectionUtil

2017-03-11 Thread Remko Popma (JIRA)
: -- Is it possible to compile only one class with Java 9 and the rest with Java 7? Maybe have a module with Java 9-only functionality? We currently delay walking the stack until we need to. Can we do something similar with capturing the stack? That is, only capture it when a) we're logging synchronously and one

[jira] [Comment Edited] (LOG4J2-1359) Add support for Java 9 StackWalker API in ReflectionUtil

2017-03-11 Thread Remko Popma (JIRA)
: -- Is it possible to compile only one class with Java 9 and the rest with Java 7? Maybe have a module with Java 9-only functionality? We currently delay walking the stack until we need to. Can we do something similar with capturing the stack? That is, only capture it when a) we're logging synchronously and one

[jira] [Commented] (LOG4J2-1359) Add support for Java 9 StackWalker API in ReflectionUtil

2017-03-11 Thread Remko Popma (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15906209#comment-15906209 ] Remko Popma commented on LOG4J2-1359: - Is it possible to compile only one class with Java 9

[jira] [Comment Edited] (LOG4J2-1359) Add support for Java 9 StackWalker API in ReflectionUtil

2017-03-11 Thread Ralph Goers (JIRA)
to get back to this... Java 9 provides multi-version support - we can provide one version of a class for pre-java9 and another for java9, but it requires the build be done with java 9, which I am reluctant to do. Also, the openjdk devs recommend that the stack frame of the caller be captured

[jira] [Commented] (LOG4J2-1359) Add support for Java 9 StackWalker API in ReflectionUtil

2017-03-11 Thread Ralph Goers (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15906196#comment-15906196 ] Ralph Goers commented on LOG4J2-1359: - I need to get back to this... Java 9 provides multi-version

[jira] [Updated] (LOG4J2-1498) [Java 9] fix dependency on old JDK versioning scheme

2017-03-03 Thread Ralph Goers (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ralph Goers updated LOG4J2-1498: Fix Version/s: (was: 2.8.1) 2.8.2 > [Java 9] fix dependency on old

Re: Java 9

2017-02-08 Thread Apache
nd found that it worked >>> pretty well. See issue: <https://issues.apache.org/jira/browse/LOG4J2-1359 >>> <https://issues.apache.org/jira/browse/LOG4J2-1359>> >>> >>> On 6 February 2017 at 09:56, Remko Popma <remko.po...@gmail.com >>&g

Re: Java 9

2017-02-06 Thread Remko Popma
09:56, Remko Popma <remko.po...@gmail.com> wrote: >>> I haven't had a chance to look at this yet, but is the new stack walking >>> API in Java 9 of any use for us? I believe applications/libraries like >>> Log4j were supposed to be the drivers behind this feature,

Re: Java 9

2017-02-06 Thread Apache
LOG4J2-1359 > <https://issues.apache.org/jira/browse/LOG4J2-1359>> > > On 6 February 2017 at 09:56, Remko Popma <remko.po...@gmail.com > <mailto:remko.po...@gmail.com>> wrote: > I haven't had a chance to look at this yet, but is the new stack walking A

Re: Java 9

2017-02-06 Thread Matt Sicker
w stack walking > API in Java 9 of any use for us? I believe applications/libraries like > Log4j were supposed to be the drivers behind this feature, but last time I > checked they were not going to cater for our use case (inspect the stack > from the bottom up)... > > From a fun

Java 9

2017-02-06 Thread Remko Popma
I haven't had a chance to look at this yet, but is the new stack walking API in Java 9 of any use for us? I believe applications/libraries like Log4j were supposed to be the drivers behind this feature, but last time I checked they were not going to cater for our use case (inspect the stack from

[jira] [Updated] (LOG4J2-1498) [Java 9] fix dependency on old JDK versioning scheme

2017-01-25 Thread Remko Popma (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Remko Popma updated LOG4J2-1498: Fix Version/s: (was: 2.8) 2.8.1 > [Java 9] fix dependency on old

Java 9 StackTraceElement

2016-12-08 Thread Apache
Java 9’s StackTraceElement has been enhanced to include the module name and module version - http://download.java.net/java/jdk9/docs/api/java/lang/StackTraceElement.html#getModuleName <http://download.java.net/java/jdk9/docs/api/java/lang/StackTraceElement.html#getModuleName>. If I unde

[jira] [Updated] (LOG4J2-1498) [Java 9] fix dependency on old JDK versioning scheme

2016-09-18 Thread Remko Popma (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Remko Popma updated LOG4J2-1498: Fix Version/s: (was: 2.7) 2.8 > [Java 9] fix dependency on old

[jira] [Created] (LOG4J2-1564) Java 9 compatibility

2016-09-06 Thread Remko Popma (JIRA)
Remko Popma created LOG4J2-1564: --- Summary: Java 9 compatibility Key: LOG4J2-1564 URL: https://issues.apache.org/jira/browse/LOG4J2-1564 Project: Log4j 2 Issue Type: Epic Reporter

[jira] [Created] (LOG4J2-1498) [Java 9] fix dependency on old JDK versioning scheme

2016-08-03 Thread Remko Popma (JIRA)
Remko Popma created LOG4J2-1498: --- Summary: [Java 9] fix dependency on old JDK versioning scheme Key: LOG4J2-1498 URL: https://issues.apache.org/jira/browse/LOG4J2-1498 Project: Log4j 2 Issue

[jira] [Assigned] (LOG4J2-1359) Add support for Java 9 StackWalker API in ReflectionUtil

2016-04-26 Thread Ralph Goers (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1359?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ralph Goers reassigned LOG4J2-1359: --- Assignee: Ralph Goers > Add support for Java 9 StackWalker API in ReflectionU

[jira] [Commented] (LOG4J2-1359) Add support for Java 9 StackWalker API in ReflectionUtil

2016-04-07 Thread Matt Sicker (JIRA)
it would have to be in its own jdk9 module, yeah. > Add support for Java 9 StackWalker API in ReflectionUtil > > > Key: LOG4J2-1359 > URL: https://issues.apache.org/jira/bro

[jira] [Updated] (LOG4J2-1359) Add support for Java 9 StackWalker API in ReflectionUtil

2016-04-07 Thread Matt Sicker (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1359?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Matt Sicker updated LOG4J2-1359: Labels: jdk9 (was: ) > Add support for Java 9 StackWalker API in ReflectionU

[jira] [Commented] (LOG4J2-1359) Add support for Java 9 StackWalker API in ReflectionUtil

2016-04-07 Thread Remko Popma (JIRA)
, would this be a separate module then? > Add support for Java 9 StackWalker API in ReflectionUtil > > > Key: LOG4J2-1359 > URL: https://issues.apache.org/jira/browse/LOG4J2-1359 >

[jira] [Commented] (LOG4J2-1359) Add support for Java 9 StackWalker API in ReflectionUtil

2016-04-07 Thread Ralph Goers (JIRA)
the actual numbers I got, but StackWalker was considerably faster than using a Throwable to capture the location information. > Add support for Java 9 StackWalker API in ReflectionUtil > > > Key: LOG4J2-1359 >

[jira] [Updated] (LOG4J2-1359) Add support for Java 9 StackWalker API in ReflectionUtil

2016-04-07 Thread Matt Sicker (JIRA)
, supporting it may require compiling at least one class using javac 1.9 and reflectively loading it in ReflectionUtil similar to how Spring supports newer JDK APIs. Without support for StackWalker, ReflectionUtil will fall back to using a slower API in Java 1.9. > Add support for Java 9 StackWalker

[jira] [Created] (LOG4J2-1359) Add support for Java 9 StackWalker API in ReflectionUtil

2016-04-07 Thread Matt Sicker (JIRA)
Matt Sicker created LOG4J2-1359: --- Summary: Add support for Java 9 StackWalker API in ReflectionUtil Key: LOG4J2-1359 URL: https://issues.apache.org/jira/browse/LOG4J2-1359 Project: Log4j 2