Profiling C/C++ program complexity in production runs.
-
Ubuntu 16.04 and run upgrade.
-
Install llvm 5.0, you can follow install-llvm.
-
Create a python virtual env and install requirement libs.
There are some examples scripts in stubs fold. Take stubs/apache34464
as an example.
-
You should change the local env variables in
run_apache34464.sh
. -
If you want to run sampling of profiling, you should set
sampling="1"
in$ sh run_apache34464.sh
. Or you can run$ sh run_apache34464.sh
directly. The script will generate two files. One isxxx_func_name_id.txt
, and the other isaprof_logger.txt
. The first file is using to map function name to its' id. The second file saves all runtime log info. Thepy
script in same fold can parse the log. -
Active your python virtual env, run
$ python run_apache34464.py
. This script will automatically fit the function curve.