Re: Official request: Please make GNU grep the default

From: Dag-Erling Smørgrav <des_at_des.no>
Date: Fri, 20 Aug 2010 11:10:21 +0200
Doug Barton <dougb_at_FreeBSD.org> writes:
> There are 2 questions, did I do the right thing, and how should people
> report problems in general. As for myself, while I have some facility
> in C it's not my strong suit. Yes, I could have produced a profiling
> version of grep, but it would have taken me a lot more than 10 minutes
> because I don't even build the profiled libs on a regular basis.

That's fair.  I didn't use to do that because it increases build time
considerably, but now I do.

If you have profiling libraries installed, you can build a profiling
version of grep (or any program) like so:

% cd /usr/src/usr.bin/grep
% make clean
% make DEBUG_FLAGS="-pg -g" -DNO_SHARED

Do *not" make install, because the result will be dog slow and you don't
want to use it in production.  Every time you run it, it will leave a
file named grep.gmon in your current directory, so:

% /usr/obj/usr/src/usr.bin/grep/grep -q "^xfce4-wm" /usr/ports/INDEX-9
% gprof /usr/obj/usr/src/usr.bin/grep/grep grep.gmon | less

> More generally however I think that we need to be realistic with what
> we expect people to do about reporting problems.

This is not about "what we expect people to do" but about "what I expect
*you*, an experienced FreeBSD committer, to do" :)

DES
-- 
Dag-Erling Smørgrav - des_at_des.no
Received on Fri Aug 20 2010 - 07:10:22 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:06 UTC