-
Notifications
You must be signed in to change notification settings - Fork 60
Add diagnostics #654
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
Add diagnostics #654
Conversation
📝 WalkthroughWalkthroughAdds verbose debug logging to Chicory instrumentation, adds entry and per-PPT decision logs to DCInstrument.should_track (keeps prior inclusion semantics), updates Premain's exception text to include the instrumenter name, and adds a null guard in DCRuntime.obj_str. No public/API signature changes. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Caller
participant DC as DCInstrument.should_track
Caller->>DC: should_track(className, methodName, pptName)
activate DC
DC->>DC: log "considering PPT for potential data collection"
alt JDK class or toString early-exit
DC-->>Caller: return (excluded)
else
DC->>DC: shouldIgnore = Instrument.shouldIgnore(className, methodName, pptName)
DC->>DC: log "ignored" if shouldIgnore true, else "included"
DC-->>Caller: return !shouldIgnore
end
deactivate DC
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ast-grep (0.38.6)java/daikon/dcomp/DCInstrument.javaTip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (3)
java/daikon/chicory/Instrument24.java(7 hunks)java/daikon/dcomp/DCInstrument.java(1 hunks)java/daikon/dcomp/Premain.java(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
java/daikon/dcomp/DCInstrument.java (2)
java/daikon/chicory/Instrument.java (1)
Instrument(60-1329)java/daikon/dcomp/Instrument.java (1)
Instrument(27-317)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
- GitHub Check: codespecs.daikon (kvasir_ubuntu_jdk25)
- GitHub Check: codespecs.daikon (typecheck_latest_ubuntu_jdk25)
- GitHub Check: codespecs.daikon (typecheck_bundled_ubuntu_jdk25)
- GitHub Check: codespecs.daikon (nontxt_ubuntu_jdk25)
- GitHub Check: codespecs.daikon (quick_ubuntu_jdk25)
- GitHub Check: codespecs.daikon (nonquick_ubuntu_jdk25)
- GitHub Check: codespecs.daikon (misc_ubuntu_jdk25)
🔇 Additional comments (7)
java/daikon/dcomp/Premain.java (1)
216-216: LGTM: clearer exception messageIncluding the instrumenter class name and preserving the cause improves diagnostics. No issues.
java/daikon/chicory/Instrument24.java (6)
34-35: LGTM: needed import for interface loggingImport of ClassEntry is appropriate for interface introspection; no issues.
372-376: LGTM: clearer class name loggingConverts internal name to binary; good for readable diagnostics.
576-577: LGTM: method signature diagnosticsAdditional method name/type logs aid triage; gated by debug.
1384-1389: LGTM: pre-adjustment param-name loggingHelpful when correlating with later LVT-based renames; debug-gated.
1428-1429: LGTM: post-adjustment param-name loggingConfirms final param names after LVT reconciliation.
1453-1458: LGTM: parameter type loggingAdds useful visibility; matches surrounding logging style.
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
♻️ Duplicate comments (2)
java/daikon/chicory/Instrument24.java (2)
382-386: Log interfaces using binary names (repeat)Use binary names for consistency with class-name logging.
- for (ClassEntry ce : classModel.interfaces()) { - debugInstrument.log(" %s%n", ce.asInternalName()); - } + for (ClassEntry ce : classModel.interfaces()) { + debugInstrument.log(" %s%n", Signatures.internalFormToBinaryName(ce.asInternalName())); + }
832-836: Remove dead commented debug block (repeat)The commented BranchInstruction snippet adds noise; delete it.
- // debug code - // case BranchInstruction bi -> { - // System.out.printf(" %s : %s%n", bi, bi.target()); - // codeList.add(ce); - // }
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (2)
java/daikon/chicory/Instrument24.java(7 hunks)java/daikon/dcomp/DCInstrument.java(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
java/daikon/dcomp/DCInstrument.java (1)
java/daikon/chicory/Instrument.java (1)
Instrument(60-1329)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
- GitHub Check: codespecs.daikon (typecheck_bundled_ubuntu_jdk25)
- GitHub Check: codespecs.daikon (typecheck_latest_ubuntu_jdk25)
- GitHub Check: codespecs.daikon (kvasir_ubuntu_jdk25)
- GitHub Check: codespecs.daikon (quick_ubuntu_jdk25)
- GitHub Check: codespecs.daikon (nonquick_ubuntu_jdk25)
- GitHub Check: codespecs.daikon (nontxt_ubuntu_jdk25)
- GitHub Check: codespecs.daikon (misc_ubuntu_jdk25)
🔇 Additional comments (4)
java/daikon/dcomp/DCInstrument.java (1)
3074-3081: Inclusion logic fix — correct and aligns with docsNegation of shouldIgnore and clearer logging look good.
java/daikon/chicory/Instrument24.java (3)
34-34: Needed import for interface loggingImport of ClassEntry is appropriate.
372-376: Class-name logging — OKConverts internal to binary name; suppression is reasonable.
575-577: Additional method debug — OKMethod name/type logging under debug is helpful.
Summary by CodeRabbit
Bug Fixes
Chores