runtime: add pprof interface for shim

Add new http interfaces to support pprof:

- /sandboxes
- /debug/vars
- /debug/pprof/
- /debug/pprof/cmdline
- /debug/pprof/profile
- /debug/pprof/symbol
- /debug/pprof/trace

Fixes: #397

Signed-off-by: bin liu <bin@hyper.sh>
This commit is contained in:
bin liu
2020-07-09 01:10:02 +08:00
parent e3a3818f7a
commit bbf8517050
18 changed files with 336 additions and 21 deletions

View File

@@ -221,6 +221,9 @@ const (
// SandboxCgroupOnly is a sandbox annotation that determines if kata processes are managed only in sandbox cgroup.
SandboxCgroupOnly = kataAnnotRuntimePrefix + "sandbox_cgroup_only"
// EnablePprof is a sandbox annotation that determines if pprof enabled.
EnablePprof = kataAnnotRuntimePrefix + "enable_pprof"
// Experimental is a sandbox annotation that determines if experimental features enabled.
Experimental = kataAnnotRuntimePrefix + "experimental"

View File

@@ -121,6 +121,9 @@ type RuntimeConfig struct {
//Experimental features enabled
Experimental []exp.Feature
// Determines if enable pprof
EnablePprof bool
}
// AddKernelParam allows the addition of new kernel parameters to an existing