gprof2dot.py error unexpected end of file

view story

http://stackoverflow.com – I'm trying to use gprof2dot.py for a demo, it keeps throwing this error error unexpected end of file I tried to Google what's the problem but got nothing helpful. Can someone help me figure it out? this is what i found. i maybe figure out what is the problem.this is my source code(version 1.0): #include <stdio.h> void main() { int i = 0; for(; i<100; ++i) ; } i follow the instruction correctly:gcc -pg -o b demo.c. gprof ./b | ./gprof2dot.py -n0 -e0 | dot -Tpng -o output.png, but the error exists. However, when i add an function in my source code(version 1.1), it d (HowTos)