Skip to content

Conversation

@vadimalekseev
Copy link
Member

@vadimalekseev vadimalekseev commented Dec 11, 2025

Describe Your Changes

Add a pprof wrapper to simplify running pprof with support for showing dependencies' source code.

Can be related: google/pprof#611 , golang/go#48601

Usage:

./benchmarks/pprof/pprof.sh http://localhost:9428/debug/pprof/heap

./benchmarks/pprof/pprof.sh ~/Downloads/heap.pprof

Checklist

The following checks are mandatory:

@vadimalekseev
Copy link
Member Author

@vadimalekseev vadimalekseev changed the title add pprof rule for profiling VictoriaLogs add Makefile rule for profiling VictoriaLogs Dec 11, 2025
@vadimalekseev vadimalekseev marked this pull request as draft December 11, 2025 18:45
@vadimalekseev vadimalekseev marked this pull request as ready for review December 11, 2025 20:06
@vadimalekseev vadimalekseev changed the title add Makefile rule for profiling VictoriaLogs add a pprof wrapper to simplify profiling Dec 11, 2025
@func25
Copy link
Contributor

func25 commented Dec 12, 2025

I like the script, though it might be nice for the Makefile to act as a single entry point for executing tools. Would it make sense to still keep the Makefile as the entry point and have it delegate to benchmarks/pprof/pprof.sh?

@AndrewChubatiuk
Copy link
Contributor

it can be a separate makefile with debug specific targets

@vadimalekseev
Copy link
Member Author

I am not sure about Makefile, because we already have the download gharchive script that is not listed in the Makefile. Let's wait for @valyala's feedback.

@valyala
Copy link
Contributor

valyala commented Dec 12, 2025

I don't like this solution, since it is very complicated and fragile. I followed an alternative path and created a pull request for pprof, which fixes all the issues with the inability to find source code for the profile - see google/pprof#977 .

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.

4 participants