Repository navigation
[native] Remove unused debugger, netlink, and bundle logging - #13001
Conversation
The debugger runtime logging category has no native logging call sites or managed consumers. Remove its parser token, internal category entries, unused getter, native log tag, and documentation examples. Reserve bit 2 and its category-name table position so all remaining native and managed logging category values and indexes stay unchanged. Actual debugger support and runtime diagnostics are unaffected. Co-authored-by: Copilot App <[email protected]>
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The removal is complete, preserves enum and tag-table compatibility, and leaves no remaining category references.
Review effort: Balanced
Findings: None
What changed in this PR
Removes the unused debugger logging category while preserving logging bit values and tag indexes.
Changes:
- Removes debugger parsing, enum members, constants, and managed accessors.
- Reserves bit 2 and the corresponding native log-name index.
- Updates logging documentation and examples.
| File | Description |
|---|---|
src/native/clr/shared/log_functions.cc |
Preserves the removed category’s tag-table slot. |
src/native/clr/runtime-base/logger.cc |
Stops accepting the debugger category. |
src/native/clr/include/constants.hh |
Removes the unused debugger log tag. |
src/Mono.Android/Android.Runtime/Logger.cs |
Removes the unused managed getter. |
src/Mono.Android/Android.Runtime/LogCategories.cs |
Reserves bit 2 while preserving later values. |
external/Java.Interop/src/java-interop/java-interop-logger.h |
Mirrors the managed enum layout. |
Documentation/workflow/SystemProperties.md |
Removes the unsupported category documentation. |
Documentation/workflow/DevelopmentTips.md |
Updates the logging example. |
|
@dalexsoto review |
The netlink logging category has no remaining log call sites or managed consumers. Remove its parser token, internal category entries, unused getter, native log tag, and documentation alongside debugger logging. Reserve bit 9 and its category-name table position to preserve the other native and managed category values and indexes. Keep the separate network category and actual OS networking functionality unchanged. Co-authored-by: Copilot App <[email protected]>
The bundle logging category has no log call sites or managed consumers, and the shared host parser already does not accept it. Remove its native and managed enum entries, unused getter, and native log tag. Reserve bit 7 and its category-name table position to preserve all other category values and indexes, including the existing debugger/netlink reservations. Application bundles, assembly stores, and packaging are unaffected. Co-authored-by: Copilot App <[email protected]>
dalexsoto
left a comment
There was a problem hiding this comment.
The unused debugger, bundle, and netlink logging infrastructure is removed without shifting retained masks or tag indexes. Bits 2/7/9 and tag slots 3/8/10 remain reserved, error slot 11 is preserved, and both runtime build/startup paths still reach the shared implementation. The complete eight-file/nine-hunk static review and consumer closure found no remaining high-confidence blocker; network/reference logging, real packaging/assembly stores, OS netlink, debugging and diagnostics remain intact.
The failed MAUI arm64 Full-R2R check was traced to Android package installation (INSTALL_FAILED_INSUFFICIENT_STORAGE / no valid UID) before application or runtime execution, not a logging-source failure. No local build, test or device execution is claimed.
The JNI reference logging migration in [#13002](#13002) leaves the native `Logger` class wrapping only startup category parsing. Move that C++ parsing into `HostCommon::init_logging_categories()` in the existing shared host source, inline exact token comparisons directly in initialization, and delete the obsolete wrapper header/source and category helper. Keep category selection before environment setup and early native diagnostics in both hosts. CoreCLR retains the original call position before assembly-store discovery and `coreclr_initialize`. NativeAOT preserves the current bootstrap: validate the Java VM, obtain the JNI environment and initialize `AppSystemProperties` first, then select logging categories and initialize the host environment. String-view comparisons preserve exact matching, unknown/empty-token behavior and `all` without allocations or modifying property data. No managed parser is introduced. Replace stale header dependencies with the declarations actually used, remove obsolete CMake source entries, and update NativeAOT MSBuild incremental inputs to track the shared initializer and header while retaining the new NativeAOT runtime-base input glob. This is the upper layer of native stack 13021, with complete ordered membership [#13002](#13002), [#13003](#13003), targeting `simonrozsival-jni-reference-tracing`, not `main`. No issue is closed. Stack metadata and the lower branch were not modified. Rebased only the upper cleanup commits from their verified historical lower fork `a125f69b6b52c9bf25128cb1c7094c029a0dbde8` onto the verified new lower head `dd94f74548437df80c6e2291b9b5db4a94a5dde0`, based on current `main` at `1089999735d3565e96cb9b443fdf04387e165350`. Old lower merge history is not retained in the upper-only range. Preserve `main`'s legacy typemap deletions and the now-merged unused debugger/netlink/bundle cleanup from [#13001](#13001): the relocated parser does not reintroduce removed tokens or category declarations. The upper-only diff contains 18 native files (62 insertions, 79 deletions) and no managed/test changes relative to the updated lower layer.
The
debugger,netlink, andbundleruntime logging categories have no native logging call sites or managed consumers.debug.dotnet.logstill accepts the first two, and the documentation advertises messages they cannot produce;bundleis already absent from the parser but retains unused infrastructure.Remove the
debuggerandnetlinktokens from the parser shared by the CoreCLR and NativeAOT hosts, all three internal managed enum entries and unused getters, native enum entries and log-tag constants, and stale documentation references. No bundle parser or documentation change is needed because neither advertises that category in the main-based checkout. This PR targetsmainand contains no JNI reference tracing migration or native startup-cleanup stack changes.Bits 2 (
debugger), 7 (bundle), and 9 (netlink) remain reserved in both enums. Category-name table indexes 3, 8, and 10 remain explicitly reserved as*none*. Every other native/managed category value and category-name index, including the error slot, is unchanged. Active categories, actual application bundle/assembly-store/packaging and OS networking/netlink functionality, debugger support, diagnostic ports, and deployment/build targets are untouched.Validation (rerun after adding the bundle removal):
networkdocumentation remain.git diff --checkbefore committing andgit diff --check origin/main...HEADafter committing.Exact source-audit command (passed all four checks)
Pull Request
title and
description
should follow the
commit-messages.mdworkflow documentation, and in particular should include: