> This PR guards usage of FileForce, SocketRead, and SocketWrite events with 
> `jfrTracing` to prevent those classes from being loaded when JFR is not in 
> use. This is the same technique as what's currently used with exception 
> events and FileRead/FileWrite events.
> 
> I used NMT and a simple test app that exercises file force and socket IO 
> paths to check for a difference in memory usage.
> **NMT Before:** 
> Classes=1188, Metadata used=966064 B, Class space used=93008 B
> **NMT After:**
> Classes=1182, Metadata used=943728 B, Class space used=89456 B
> Note that the difference in amount used doesn't actually change amount 
> committed because the backing memory is pre-allocated in chunks with larger 
> granularity.
> 
> Testing:
> - new test test/jdk/jdk/jfr/event/io/TestEventsNotLoadedWithoutJfr.java to 
> check the guards work properly
> - tier 1
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

Robert Toyonaga has updated the pull request incrementally with one additional 
commit since the last revision:

  review feedback

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/30948/files
  - new: https://git.openjdk.org/jdk/pull/30948/files/f2f12ab5..3394e886

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=30948&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=30948&range=00-01

  Stats: 147 lines in 8 files changed: 52 ins; 43 del; 52 mod
  Patch: https://git.openjdk.org/jdk/pull/30948.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/30948/head:pull/30948

PR: https://git.openjdk.org/jdk/pull/30948

Reply via email to