raboof / zshprof Goto Github PK
View Code? Open in Web Editor NEWzsh script profiling
zsh script profiling
When I run this command:
ocamlfind ocamlopt -linkpkg -thread -package str Callgrind.ml ZshXtrace.ml ZshXtraceToCallgrind.ml && ./a.out < /tmp/zshstart.6560.log > zsh.callgrind
I get this error:
File "Callgrind.ml", line 23, characters 17-22:
Error: This expression has type func but an expression was expected of type
file
I know this is a pretty basic question, but I have no experience with OCaml. I did brew install ocaml
(I'm on a Mac) and tried the command in the README, but it couldn't find the ocamlfind
program.
./log2callgrind < /tmp/zshstart.$$.log > zsh.callgrind
Fatal error: exception Stack overflow
As simple as this... Running in gdb doesn't help much:
Starting program: /tmp/zshprof/log2callgrind < /tmp/zshstart.28171.log
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
0x00005555555ea951 in caml_call_gc ()
(gdb) bt
#0 0x00005555555ea951 in caml_call_gc ()
Backtrace stopped: Cannot access memory at address 0x7fffff7fecd8
Thanks for providing this tool, it looks really useful. Unfortunately, however, the parser seems to fail on the first line of my log:
File "ZshXtraceToCallgrind.ml", line 111, characters 4-382:
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a value that is not matched:
[]
Fatal error: exception ZshXtraceToCallgrind.InvalidLine("\ 1452762843 %6. /home/peter/.zshrc 10 /home/peter/.zshrc ZSH=/home/peter/.oh-my-zsh ")
Without looking at the code, I have no idea what the problem could be...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.