mirror of
https://github.com/oven-sh/bun
synced 2026-02-16 22:01:47 +00:00
This commit adds full support for the Node.js v8.GCProfiler API, providing JavaScript garbage collection profiling capabilities in Bun. Key changes: - Added JSGCProfiler C++ class with JavaScriptCore bindings - Integrated with JavaScriptCore's heap profiling capabilities - Wired up GCProfiler export in node:v8 module - Added comprehensive test suite with 16 test cases - Follows Bun's established patterns for C++ class integration The implementation provides the standard Node.js GCProfiler interface: - new GCProfiler() constructor - start() method to begin profiling - stop() method to end profiling and return data - Compatible data format with version, timestamps, and statistics 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>