Re: RFR: 8295537: Debug tracing for resolved java.lang.invoke.CallSite [v2]

2022-10-25 Thread Ioi Lam
On Tue, 25 Oct 2022 19:33:25 GMT, Mandy Chung wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> @JornVernee comments > > src/java.base/share/classes/java/lang/invoke/MethodHandleNatives.java line > 312: > >> 310:

Re: RFR: 8295537: Debug tracing for resolved java.lang.invoke.CallSite [v2]

2022-10-25 Thread Ioi Lam
On Tue, 25 Oct 2022 19:46:15 GMT, Jorn Vernee wrote: >>> Is it possible to use filter/findfirst without using lambdas? I want to >>> avoid recursion inside the tracing code. >> >> You could do this I believe (if I've eye-balled that correctly :)): >> Suggestion: >> >> String callerName

Re: RFR: 8295537: Debug tracing for resolved java.lang.invoke.CallSite [v2]

2022-10-25 Thread Jorn Vernee
On Tue, 25 Oct 2022 19:43:14 GMT, Jorn Vernee wrote: >> Is it possible to use filter/findfirst without using lambdas? I want to >> avoid recursion inside the tracing code. >> >> I am not sure about dumping the call stack. It seems an overkill and not >> useful in most cases. It’s easier to reb

Re: RFR: 8295537: Debug tracing for resolved java.lang.invoke.CallSite [v2]

2022-10-25 Thread Jorn Vernee
On Tue, 25 Oct 2022 19:37:06 GMT, Ioi Lam wrote: > Is it possible to use filter/findfirst without using lambdas? I want to avoid > recursion inside the tracing code. You could do this I believe (if I've eye-balled that correctly :)): Suggestion: String callerName = caller.getName();

Re: RFR: 8295537: Debug tracing for resolved java.lang.invoke.CallSite [v2]

2022-10-25 Thread Mandy Chung
On Tue, 25 Oct 2022 17:34:15 GMT, Ioi Lam wrote: >> I've added a `java.lang.invoke.MethodHandle.TRACE_CALLSITE` property to show >> how invokedynamic call sites are resolved. >> >> For example: >> >> >> public class StrConcat { >> static String hello = "Hello"; >> static String world

Re: RFR: 8295537: Debug tracing for resolved java.lang.invoke.CallSite [v2]

2022-10-25 Thread Ioi Lam
On Tue, 25 Oct 2022 18:54:44 GMT, Jorn Vernee wrote: >> src/java.base/share/classes/java/lang/invoke/MethodHandleNatives.java line >> 329: >> >>> 327: return null; >>> 328: } >>> 329: }); >> >> Not sure about this condition. It seems like `callerInfo[0] == c

Re: RFR: 8295537: Debug tracing for resolved java.lang.invoke.CallSite [v2]

2022-10-25 Thread Jorn Vernee
On Tue, 25 Oct 2022 17:34:15 GMT, Ioi Lam wrote: >> I've added a `java.lang.invoke.MethodHandle.TRACE_CALLSITE` property to show >> how invokedynamic call sites are resolved. >> >> For example: >> >> >> public class StrConcat { >> static String hello = "Hello"; >> static String world

Re: RFR: 8295537: Debug tracing for resolved java.lang.invoke.CallSite [v2]

2022-10-25 Thread Jorn Vernee
On Tue, 25 Oct 2022 18:54:19 GMT, Jorn Vernee wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> @JornVernee comments > > src/java.base/share/classes/java/lang/invoke/MethodHandleNatives.java line > 329: > >> 327:

Re: RFR: 8295537: Debug tracing for resolved java.lang.invoke.CallSite [v2]

2022-10-25 Thread Ioi Lam
On Tue, 25 Oct 2022 13:16:19 GMT, Jorn Vernee wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> @JornVernee comments > > src/java.base/share/classes/java/lang/invoke/CallSite.java line 179: > >> 177: target.type(

Re: RFR: 8295537: Debug tracing for resolved java.lang.invoke.CallSite [v2]

2022-10-25 Thread Ioi Lam
> I've added a `java.lang.invoke.MethodHandle.TRACE_CALLSITE` property to show > how invokedynamic call sites are resolved. > > For example: > > > public class StrConcat { > static String hello = "Hello"; > static String world = "World"; > public static void main(String args[]) { >