0

I have following execution stack:

  1. C++

  2. C Lua API

  3. LuaJIT

  4. C functions - my own functions, injected to Lua via C-Lua-API which called from lua script

I want to profiling this code. And I want to know percentage time spent in luajit phase.

I see come problems here. If I will compile luajit with flags something like -pg -fprofile-generate -fprofile-use it will be not the same that luajit compiled for production build.

Is there any way to figure out what's going on in LUAJit phase?

Good example of this executions stack - openresty

2
  • Where is the code? Commented Dec 4, 2017 at 10:16
  • As example, u can see open-resty source. Commented Dec 4, 2017 at 10:45

1 Answer 1

0

It's good idea use perf utility and flamegraph. And there is no reason to recompile with gcc flags like -fomit-frame-pointer, -fprofile-generate, -fprofile-use.

perf doesn't need this flags for collect information. Only -pg flag.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.