On Fri, 8 Apr 2022 at 06:57, Michael Kuhlmann wrote:
> Good morning!
>
> On 4/7/22 23:59, Kasper Nielsen wrote:
> > Hi Michael,
> >
> > I don't really have an opinion on how you obtain a logger. But one
> > particular
> > use-case I've had was that I would like to perform some access checks
>
Good morning!
On 4/7/22 23:59, Kasper Nielsen wrote:
Hi Michael,
I don't really have an opinion on how you obtain a logger. But one
particular
use-case I've had was that I would like to perform some access checks based
on the module of the caller. Something similar to how Panama checks for
>
> Hi Kasper,
>
> sorry to jump in here as an uninvolved onlooker, but I can't resist.
> I really don't see why this should matter. Getting the caller class is a
> rare edge case that you just do in exceptional situations; most often
> it's more for debugging or something.
>
> What users really
>> ____
>> From: core-libs-dev on behalf of
>> Michael Kuhlmann
>> Sent: Thursday, April 7, 2022 7:55:16 PM
>> To: core-libs-dev@openjdk.java.net
>> Subject: Re: fast way to infer caller
>>
>>
>>
>> On 4/7
concerns perhaps there is some more work to be done improving StackWalker? :)
Jason
From: core-libs-dev on behalf of Bernd
Eckenfels
Sent: Thursday, April 7, 2022 1:02 PM
To: core-libs-dev@openjdk.java.net
Subject: Re: fast way to infer caller
Some
uhlmann
> Sent: Thursday, April 7, 2022 7:55:16 PM
> To: core-libs-dev@openjdk.java.net
> Subject: Re: fast way to infer caller
>
>
>
> On 4/7/22 19:27, Kasper Nielsen wrote:
>>>
>>> nope, see my previous mail to Ceki, the VM is cheating here if it can
>
: Thursday, April 7, 2022 7:55:16 PM
To: core-libs-dev@openjdk.java.net
Subject: Re: fast way to infer caller
On 4/7/22 19:27, Kasper Nielsen wrote:
>>
>> nope, see my previous mail to Ceki, the VM is cheating here if it can
>> inline the call to MethodHandles.lookup()
>
On 4/7/22 19:27, Kasper Nielsen wrote:
nope, see my previous mail to Ceki, the VM is cheating here if it can
inline the call to MethodHandles.lookup()
Does how the VM cheats really matter? The fact is that the code in the JDK
can
get the calling class and implement something like
>
> nope, see my previous mail to Ceki, the VM is cheating here if it can
> inline the call to MethodHandles.lookup()
>
Does how the VM cheats really matter? The fact is that the code in the JDK
can
get the calling class and implement something like MethodHandles.lookup() so
it takes ~3 ns. If
Rémi, Jason, Steven, Kasper,
Thank you all for your thoughtful feedback.
I forgot to mention that in addition to obtaining the appropriate logger
by inferring caller class, the caller class may also be a data point
written with each logging event, aka LogRecord.
If the cost of writing a log
> From: "Kasper Nielsen"
> To: "Remi Forax"
> Cc: "Ceki Gülcü" , "core-libs-dev"
>
> Sent: Thursday, April 7, 2022 2:42:46 PM
> Subject: Re: fast way to infer caller
> On Thu, 7 Apr 2022 at 13:33, Remi Forax < [ mailto:fo...
On Thu, 7 Apr 2022 at 13:33, Remi Forax wrote:
> - Original Message -
> > From: "Kasper Nielsen"
> > To: "Ceki Gülcü"
> > Cc: "core-libs-dev"
> > Sent: Thursday, April 7, 2022 1:53:33 PM
> > Subject: Re: fast way to infe
- Original Message -
> From: "Kasper Nielsen"
> To: "Ceki Gülcü"
> Cc: "core-libs-dev"
> Sent: Thursday, April 7, 2022 1:53:33 PM
> Subject: Re: fast way to infer caller
>>
>> MethodHandles.lookup().lookupClass() looks very prom
>
> MethodHandles.lookup().lookupClass() looks very promising except that
> there is no way to specify the depth.
>
> I am looking for a method to obtain the Nth caller at a cost of around
> 100 to 200 nanoseconds of CPU time. Do you think the JDK could cater
> for this use case?
>
Hi Ceki,
I
- Original Message -
> From: "Ceki Gülcü"
> To: "core-libs-dev"
> Sent: Thursday, April 7, 2022 1:04:11 AM
> Subject: Re: fast way to infer caller
> Hi Jason,
>
> Yes, the code was mentioned in SLF4J PR 271.
>
> The benchmark can b
> On Apr 6, 2022, at 3:54 PM, Remi Forax wrote:
>
> - Original Message -
>> From: "Ceki Gülcü"
>> To: "core-libs-dev"
>> Sent: Wednesday, April 6, 2022 11:26:39 PM
>> Subject: Re: fast way to infer caller
>
>> Hi Rém
c/java.logging/share/classes/java/util/logging/LogRecord.java#L754
>
> Jason
>
>
> From: core-libs-dev on behalf of Ceki
> Gülcü
> Sent: Wednesday, April 6, 2022 4:26 PM
> To: core-libs-dev
> Subject: Re: fast way to
- Original Message -
> From: "Ceki Gülcü"
> To: "core-libs-dev"
> Sent: Wednesday, April 6, 2022 11:26:39 PM
> Subject: Re: fast way to infer caller
> Hi Rémi,
>
> Thank you for your answer.
>
> According to some benchmarks on a
?
https://github.com/openjdk/jdk/blob/master/src/java.logging/share/classes/java/util/logging/LogRecord.java#L754
Jason
From: core-libs-dev on behalf of Ceki
Gülcü
Sent: Wednesday, April 6, 2022 4:26 PM
To: core-libs-dev
Subject: Re: fast way to infer caller
make sense? How difficult would it be to add such a method?
--
Ceki Gülcü
On 4/6/2022 5:52 PM, Remi Forax wrote:
> - Original Message -
>> From: "Ceki Gülcü"
>> To: "core-libs-dev"
>> Sent: Wednesday, April 6, 2022 5:30:51 PM
>> Subject: f
- Original Message -
> From: "Ceki Gülcü"
> To: "core-libs-dev"
> Sent: Wednesday, April 6, 2022 5:30:51 PM
> Subject: fast way to infer caller
> Hello,
Hello,
>
> As you are probably aware, one of the important primitives used in
&g
Hello,
As you are probably aware, one of the important primitives used in
logging libraries is inferring the caller of a given logging statement.
The current common practice is to create a throwable and process its
stack trace. This is rather wasteful and rather slow. As an alternative,
I have
22 matches
Mail list logo