Skip to content

[GR-31691] Initial JFR support. #3444

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 112 commits into from
Jun 11, 2021

Conversation

christianhaeubl
Copy link
Member

No description provided.

christianhaeubl and others added 30 commits January 25, 2021 17:20
jiekang and others added 18 commits May 5, 2021 11:11
* Merge JfrSerializer interface into JfrRepository

* Add comment about repository ordering

* Move symbolRepo after methodRepo and stackTraceRepo
* Reintroduced the JfrSerializerSupport.
* Renamed JfrRepository to JfrConstantPool.
* Removed all TODOs.
* Removed unused classes.
* Disallow Java synchronization in VM operations.
* Moved UninterruptibleHashTable.
* Moved all JFR test cases.
* Only enable JFR on JDK11.
* Minor style-related changes.
* Disable writing thread start/end events until we have more of the thread-related JFR infrastructure.
* Fixed issue regarding uninterruptible.
* Removed more unused code.
@christianhaeubl
Copy link
Member Author

@jiekang : instead of a rebase, I used a more selective approach. This changed the hashes of the following RedHat commits: 8f220de, 9bbfeaf, and 4e53401. All other commits are either my own or they should have the same hash as in your jfr-backup branch.

@graalvmbot
Copy link
Collaborator

  • Hello Jie Kang, thanks for contributing a PR to our project!

We use the Oracle Contributor Agreement to make the copyright of contributions clear. We don't have a record of you having signed this yet, based on your email address jkang -(at)- redhat -(dot)- com. You can sign it at that link.

If you think you've already signed it, please comment below and we'll check.

  • Hello Victor Ma, thanks for contributing a PR to our project!

We use the Oracle Contributor Agreement to make the copyright of contributions clear. We don't have a record of you having signed this yet, based on your email address vma -(at)- redhat -(dot)- com. You can sign it at that link.

If you think you've already signed it, please comment below and we'll check.

@jiekang
Copy link
Collaborator

jiekang commented Jun 2, 2021

  • Hello Jie Kang, thanks for contributing a PR to our project!

We use the Oracle Contributor Agreement to make the copyright of contributions clear. We don't have a record of you having signed this yet, based on your email address jkang -(at)- redhat -(dot)- com. You can sign it at that link.

If you think you've already signed it, please comment below and we'll check.

  • Hello Victor Ma, thanks for contributing a PR to our project!

We use the Oracle Contributor Agreement to make the copyright of contributions clear. We don't have a record of you having signed this yet, based on your email address vma -(at)- redhat -(dot)- com. You can sign it at that link.

If you think you've already signed it, please comment below and we'll check.

Both Jie and Victor ([email protected] and [email protected]) are Red Hat employees and I believe have the OCA signed on their behalf.

@jiekang
Copy link
Collaborator

jiekang commented Jun 2, 2021

@jiekang : instead of a rebase, I used a more selective approach. This changed the hashes of the following RedHat commits: 8f220de, 9bbfeaf, and 4e53401. All other commits are either my own or they should have the same hash as in your jfr-backup branch.

Okay. I think the commit contents and authors look fine. Thank you.

@graalvmbot
Copy link
Collaborator

  • Jie Kang has signed the Oracle Contributor Agreement (based on email address jkang -(at)- redhat -(dot)- com) so can contribute to this repository.
  • Victor Ma has signed the Oracle Contributor Agreement (based on email address vma -(at)- redhat -(dot)- com) so can contribute to this repository.

public static final long TRANSIENT_META_BIT = (BIT << 3);
public static final long TRANSIENT_BIT = (TRANSIENT_META_BIT << META_SHIFT);
public static final long SERIALIZED_META_BIT = (BIT << 4);
public static final long SERIALIZED_BIT = (SERIALIZED_META_BIT << META_SHIFT);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't seem to me like TRANSIENT_BIT or SERIALIZED_BIT can ever be set within a tag.

If so, then these could be deleted, as well as the checks for the TRANSIENT_BIT

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, those are unused in this incarnation. We might need them later, when (and if) we implement stuff like leak detection, but should probably add them back only when we actually need them. They can be safely removed.

@Uninterruptible(reason = "Epoch may not change")
private static boolean isNotTagged(long value) {
long thisEpochBit = JfrTraceIdEpoch.getInstance().thisEpochBit();
return ((value & ((thisEpochBit << JfrTraceId.META_SHIFT) | thisEpochBit)) != thisEpochBit);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is (thisEpochBit << JfrTraceId.META_SHIFT) being checked?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It checks if the Class is tagged as used in the current epoch (as opposed to the previous epoch).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is the value shifted? I see, JftTraceIdEpoch.changeEpoch(), but is cleanup done somewhere else as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will remove this method and do a few more cleanups as those things are no longer needed anyways.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants