Alexey Romanov
Alexey Romanov

Reputation: 170745

Profiling linked-in drivers in Erlang

How can I profile a linked-in port driver? OTP tools (fprof, etc.) apparently only profile Erlang code, and I don't have a C executable file to feed to gprof.

Upvotes: 2

Views: 357

Answers (2)

adolgarev
adolgarev

Reputation: 188

as far as linked-in port driver is .so library that is dynamically loaded into erl process (on linux) you can run valgrind --tool=callgrind --callgrind-out-file=file.out erl (see other options in docs for callgrind), then execute some tests from erl shell, exit from shell and load file.out in some tool like KCachegrind

Upvotes: 2

I GIVE CRAP ANSWERS
I GIVE CRAP ANSWERS

Reputation: 18879

Can't you just profile the erl executable and then get that to the gprof tool? I am pretty sure this is how it is done by the Erlang devs anyway.

Upvotes: 3

Related Questions