Skip to content

Profiling ferite scripts#4

Open
cention-nazri wants to merge 7 commits intodarkrock:masterfrom
cention-nazri:profile
Open

Profiling ferite scripts#4
cention-nazri wants to merge 7 commits intodarkrock:masterfrom
cention-nazri:profile

Conversation

@cention-nazri
Copy link

This enables profiling of ferite script. It records the time spent in statements and functions.

Nazri Ramliy added 7 commits April 21, 2014 12:30
RUn configure with --enable-profile, then

    $ ferite --fe-profile=out.json <file.fe>

Feed out.json to fprof[1] to produce the html reports.

Profile metrics are saved into the given file at atexit(3)

[1] https://github.com/cention-nazri/fprof
native_information->line holds the same information, there were no
equivalent information for non-native functions.

Eventually these two locations should be consolidated as one - the next
commit after this one will do it.
Saving profiling data atexit(3) may cause a segfault due to
ferite_deinit() being called before ferite_profile_save() - the memory
allocated for the profiling metrics may have been freed by the garbage
collector.

Provide an api for saving the profiling data at exit for use by clients
such as mod_ferite.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant