gprof output via run-profile

2 views
Skip to first unread message

Rupert

unread,
Jun 23, 2007, 1:15:43 PM6/23/07
to ocropus
Hi, I think there might be an error in the run-profile script.

To get the gmon.out generated, the final link step to create ocropus-
cmd/ocropus needs to include a "-pg", and ldflags="-pg" doesn't seem
to work.

The following patch switches the jam command to set LINKFLAGS to -pg,
which does work on my system. Comments?

/// BEGIN PATCH!
Index: run-profile
===================================================================
--- run-profile (revision 95)
+++ run-profile (working copy)
@@ -5,7 +5,7 @@
jam clean
test -x ocropus-cmd/ocropus && die "failed to clean ocropus
executable"

-jam -dx -s opt='-g -O2 -DUNSAFE -pg' -s ldflags='-pg' || die "jam
build failed"
+jam -dx -s opt='-g -O2 -DUNSAFE -pg' -s LINKFLAGS='-pg' || die "jam
build failed"
test -x ocropus-cmd/ocropus || die "failed to build ocropus
executable"

./ocropus-cmd/ocropus ocr data-test-pages/*.png > profile.hocr || die
"ocr failed"
/// END PATCH!

Christian Kofler

unread,
Jun 23, 2007, 1:32:45 PM6/23/07
to ocropus
Hi Rupert,

thanks for the patch, works for me as well.
We are currently working on ocropus testing,
the scripts will be probably updated next week.

cheers,

Christian

Reply all
Reply to author
Forward
0 new messages