> Greetings,
> 
> The following change set addresses the data loss resulting in the assertion 
> "Missing object ID X in pool jdk.types.Method".
> 
> It involves three components:
> 
> 1. Address a regression introduced by 
> [JDK-835221](https://bugs.openjdk.org/browse/JDK-8352251). By locating 
> JFR_ONLY(Jfr::check_and_process_sample_request(thread);) before the 
> global_poll() in SafepointMechanism::process(), a stacktrace can be captured, 
> and artifacts tagged, during a safepoint. This breaks an invariant as 
> artifacts, i.e. methods, can be tagged in the wrong epoch (also a stacktrace 
> can be stored in the wrong epoch). Must be moved to post global_poll().
> 
> 2. Retransform/Redefine classes include a non-safe copy of Method trace 
> flags, leading to stale bits being set onto the new Methods. Method trace 
> flags need to be copied, but must be done under a safepoint.
> 
> 3. It seems that there has been an increase in the frequency of issuing calls 
> to InstanceKlass::purge_previous_versions(), making scratch klasses and old 
> methods disappear before JFR gets the chance to serialize also tagged old 
> methods. Therefore, we need to ensure that we always tag the latest version 
> of a Method.
> 
> There is also a cleanup of gratuitous type conversions, from Klass* to 
> InstanceKlass* in the newly introduced MethodTracing subsystem.
> 
> Testing: jdk_jfr, stress testing
> 
> Thank you
> Markus

Markus Grönlund has updated the pull request incrementally with one additional 
commit since the last revision:

  removed unused

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/26458/files
  - new: https://git.openjdk.org/jdk/pull/26458/files/e68e9f3c..6504e1b7

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=26458&range=04
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26458&range=03-04

  Stats: 2 lines in 1 file changed: 0 ins; 2 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/26458.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/26458/head:pull/26458

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

Reply via email to