Skip to content

refactor: delete MCP server, remove GC barrier, etc - #1

Merged
mircodz merged 13 commits into
mainfrom
cleanup
Oct 16, 2026
Merged

mircodz merged 13 commits into
mainfrom
cleanup

Conversation

@mircodz

@mircodz mircodz commented Oct 6, 2026

Copy link
Copy Markdown
Owner

No description provided.

@mircodz mircodz changed the title refactor: cleanup MCP server, remove GC barrier, etc refactor: delete MCP server, remove GC barrier, etc Oct 6, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Persisted frame identities can merge unrelated methods, and terminated EventPipe streams remain cached as valid metrics.

2 open findings
What changed in this PR

This PR removes MCP support, simplifies coherent snapshot capture, adds EventPipe live metrics, and improves allocation-frame signatures and matching.

Changes:

  • Removes the MCP server and experimental GC-barrier interface.
  • Adds signature-aware frame labels and overload matching.
  • Adds runtime counters and restructures live capture coordination.
File Description
version Bumps version to 0.1.2.
tests/​Sherlock.Core.Tests/​Profiling/​FrameNamesTests.cs Tests frame parsing and matching.
tests/​Sherlock.Core.Tests/​Profiling/​AllocationProfileTests.cs Tests overload-aware allocation filtering.
tests/​Sherlock.Core.Tests/​Collection/​SnapshotCaptureTests.cs Updates simplified capture-result tests.
tests/​Sherlock.Core.Tests/​Collection/​RunTargetTests.cs Adds runtime-metrics tests.
tests/​Sherlock.Core.Tests/​Collection/​RunOptionsTests.cs Removes GC-barrier tests.
tests/​Sherlock.Core.Tests/​Collection/​ProfilerControlTests.cs Updates control-protocol request coverage.
tests/​Sherlock.CLI.Tests/​RunLauncherTests.cs Updates run-option validation tests.
tests/​Sherlock.CLI.Tests/​ReplCommandTests.cs Updates invalid REPL option coverage.
src/​Sherlock.Mcp/​SherlockTools.cs Removes MCP tools.
src/​Sherlock.Mcp/​Sherlock.Mcp.csproj Removes MCP project.
src/​Sherlock.Mcp/​OpenSnapshots.cs Removes MCP snapshot cache.
src/​Sherlock.Mcp/​McpServer.cs Removes MCP host.
src/​Sherlock.Mcp/​Dto.cs Removes MCP DTO mapping.
src/​Sherlock.Core/​Sherlock.Core.csproj Adds TraceEvent dependency.
src/​Sherlock.Core/​Profiling/​FrameNames.cs Adds frame parsing and matching.
src/​Sherlock.Core/​Profiling/​AllocationTree.cs Matches overload groups in caller trees.
src/​Sherlock.Core/​Profiling/​AllocationProfile.cs Adds overload-aware filtering.
src/​Sherlock.Core/​Collection/​SnapshotCapture.cs Simplifies coherent capture results.
src/​Sherlock.Core/​Collection/​RuntimeCounters.cs Adds EventPipe heap metrics.
src/​Sherlock.Core/​Collection/​RunTarget.cs Coordinates counters and coherent capture.
src/​Sherlock.Core/​Collection/​RunOptions.cs Removes experimental barrier options.
src/​Sherlock.Core/​Collection/​ProfilerControl.cs Removes obsolete protocol commands.
src/​Sherlock.CLI/​Workspace.cs Returns snapshot entries directly.
src/​Sherlock.CLI/​Tui/​ObjectView.cs Uses structured frame splitting.
src/​Sherlock.CLI/​Sherlock.CLI.csproj Removes MCP project reference.
src/​Sherlock.CLI/​RunLauncher.cs Removes barrier CLI parsing.
src/​Sherlock.CLI/​Repl/​Commands/​SnapshotReplCommand.cs Updates capture reporting.
src/​Sherlock.CLI/​Repl/​Commands/​KillReplCommand.cs Adapts to capture return type.
src/​Sherlock.CLI/​Repl/​Commands/​AllocationsReplCommand.cs Reuses frame-name formatting.
src/​Sherlock.CLI/​Program.cs Removes MCP command; enables strict parsing.
src/​Sherlock.CLI/​Live/​LiveDashboard.cs Adds counters and serialized captures.
src/​Sherlock.CLI/​Export/​AllocationDot.cs Reuses frame-name formatting.
src/​Sherlock.CLI/​Commands/​TuiCommand.cs Updates command API override.
src/​Sherlock.CLI/​Commands/​RunCommand.cs Integrates revised live dashboard.
src/​Sherlock.CLI/​Commands/​McpCommand.cs Removes MCP CLI command.
src/​Sherlock.CLI/​Commands/​CollectCommand.cs Updates command API override.
src/​Sherlock.CLI/​Commands/​AnalyzeCommand.cs Updates command API override.
src/​native/​tests/​signature.cpp Tests signature formatting.
src/​native/​tests/​method_registry.cpp Updates frame-label expectations.
src/​native/​tests/​control_channel.cpp Updates protocol fixtures.
src/​native/​tests/​coherent_capture.cpp Updates simplified barrier API tests.
src/​native/​tests/​CMakeLists.txt Builds signature tests.
src/​native/​tests/​aggregator.cpp Tests distinct overload frames.
src/​native/​src/​profiler/​signature.cpp Implements signature formatting.
src/​native/​src/​profiler/​profiler.cpp Simplifies capture protocol and timeouts.
src/​native/​src/​profiler/​method_registry.cpp Generates signature-aware labels.
src/​native/​include/​sherlock/​profiler/​signature.hpp Declares signature APIs.
src/​native/​include/​sherlock/​profiler/​profiler.hpp Adds capture timeout state.
src/​native/​include/​sherlock/​control/​protocol.hpp Simplifies control and barrier APIs.
src/​native/​CMakeLists.txt Builds signature implementation.
Sherlock.slnx Removes MCP project.
Directory.Packages.props Updates dependencies and removes MCP packages.
.mcp.json Removes MCP configuration.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

}
if (SUCCEEDED(resolution.status)) {
entry.name = std::format("{} [m{}:{:08x}]", safeLabel(resolution.symbol), generation, static_cast<std::uint32_t>(token));
entry.name = safeLabel(resolution.symbol);
Comment on lines +99 to +103
source.Process();
}
catch (Exception)
{
// The stream ends abruptly when the target exits or the session is stopped.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Frame identity collisions, ambiguous explicit-interface parsing, and broken REPL delimiter handling can produce incorrect analysis or command behavior.

5 open findings

🧠 Review effort: Balanced

Comment thread src/native/tests/method_registry.cpp Outdated
EXPECT_EQ(registry.name(otherModule), "Example.Owner.Method [m2:06000001]");
EXPECT_EQ(registry.name(first), "Example.Owner.Method(int)");
EXPECT_EQ(registry.name(overload), "Example.Owner.Method(string)");
EXPECT_EQ(registry.name(otherModule), "Example.Owner.Method(int)");
Comment on lines +179 to +181
if (arg == "--")
{
break; // everything after "--" is an operand
Comment thread src/Sherlock.Core/Profiling/FrameNames.cs Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

$"[{Palette.Address}]0x{instance.Address:x}[/]",
$"[bold {Palette.Text}]{ByteSize.Format((long)instance.Size)}[/]",
Styled.Type(instance.TypeName),
instance.Preview is null ? "" : $"[{Palette.Text}]{Markup.Escape(TextUtil.Preview(instance.Preview))}[/]");
@mircodz
mircodz merged commit 6537d00 into main Oct 16, 2026
9 checks passed
@mircodz
mircodz deleted the cleanup branch October 16, 2026 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants