Skip to content

The problem with pprof #90

@UncleVic

Description

@UncleVic

I try to use pprof to heap control.

I built the lib from src as was written in the doc

git clone --branch release/4 https://github.com/restream/reindexer.git $GOPATH/src/reindexer
bash $GOPATH/src/reindexer/dependencies.sh
cd $GOPATH/src/reindexer
go generate ./bindings/builtin
go generate ./bindings/builtinserver

# Go to your app's directory
cd /your/app/path
go get -a github.com/restream/reindexer/v5
go mod edit -replace github.com/restream/reindexer/v5=$GOPATH/src/reindexer

But after running I've got a message

go tool pprof -alloc_space http://localhost:4444/debug/cgo/pprof/heap
Fetching profile over HTTP from http://localhost:4444/debug/cgo/pprof/heap
http://localhost:4444/debug/cgo/pprof/heap: parsing profile: empty input file
failed to fetch any source profiles

If I try getting prebuild package and build my app, I get the error

19.06 # github.com/restream/reindexer/v5/pprof
19.06 /go/pkg/mod/github.com/restream/reindexer/v5@v5.0.1/pprof/memstat_tcmalloc.go:5:11: fatal error: gperftools/malloc_extension_c.h: No such file or directory
19.06     5 | // #include <gperftools/malloc_extension_c.h>
19.06       |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
19.06 compilation terminated.
28.22 # gitlab.com/mskr/edi/edi/internal/pkg/csp
28.22 signer.c: In function 'CleanupResources':
28.22 signer.c:78:21: warning: assignment to 'HCRYPTPROV' {aka 'long long unsigned int'} from 'void *' makes integer from pointer without a cast [-Wint-conversion]
28.22    78 |         *hCryptProv = NULL;
28.22       |                     ^

What did I wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions