On Mon, 25 Sep 2023 16:57:46 GMT, Erik Gahlin <[email protected]> wrote:

> Hi,
> 
> The events for socket read and socket write retrieves the remote address even 
> in cases where the event didn't exceed the threshold. By moving the 
> shouldCommit check earlier, it can be avoided. 
> 
> Testing: jdk/jdk/jfr
> 
> Thanks
> Erik

> I was planning to change the convenience function to take functions as 
> arguments. With this change there is a bunch of duplicated code.
> 
> I was planning to push the change for JDK-8310978 today, but I guess that 
> will have to wait as it's impacted by this.



> I was planning to change the convenience function to take functions as 
> arguments. With this change there is a bunch of duplicated code.
> 
> I was planning to push the change for JDK-8310978 today, but I guess that 
> will have to wait as it's impacted by this.

If it's a lambda, it could be problematic. I have another change coming up, 
which also motivated this PR. It's still in draft, need to decide on the 
syntax, but it adds an annotation that can filter out stack frames, for example 
the emit() method. A lambda wouldn't get a proper method name.

https://github.com/openjdk/jdk/pull/15867

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

PR Comment: https://git.openjdk.org/jdk/pull/15908#issuecomment-1759888327

Reply via email to