Re: Lessons from commit fest

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Greg Smith <gsmith(at)gregsmith(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Lessons from commit fest
Date: 2008-04-18 16:22:35
Message-ID: 4808CACB.7040108@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> writes:
>
>> Greg Smith wrote:
>>
>>> Scraping that HTML seems like it would be pretty straightforward.
>>>
>
>
>> It's awfully incomplete. Bruce said to me the other day on IM that the
>> list he was getting with the Linux version of find_typedef was something
>> like 2800 symbols. I checked the doxygen list and I only see about a
>> dozen for each letter, so there's a whole lot missing here.
>>
>
> [ click click... ] A quick grep counts 2154 occurrences of the word
> 'typedef' in our tree. Some of them are no doubt false hits
> (documentation etc), but on the other hand you need to add typedefs
> coming from system headers.
>
> doxygen's 200-some is clearly an order of magnitude too low, but I
> wonder whether Bruce's list hasn't got some false hits ...
>
>
>

2800 does seem a bit high. My buildfarm member dungbeetle just found
2482 on a build that is only missing the optional pam, bonjour and
gssapi config options.

Here's the list already loaded to the server:
http://www.pgbuildfarm.org/cgi-bin/show_stage_log.pl?nm=dungbeetle&dt=2008-04-18%20160103&stg=typedefs

I had to change the logic some - the stuff in the find_typedefs script
seemed to be quite broken on my Linux box (fairly vanilla fc6).

The relevant perl code is below.

I'll see about running this with Windows and Cygwin and I can even try OSX.

cheers

andrew

sub find_typedefs
{
my @err = `objdump -W 2>&1`;
my %syms;
my @dumpout;
my @flds;
foreach my $bin (glob("$installdir/bin/*"),
glob("$installdir/lib/*"),
glob("$installdir/lib/postgresql/*"))
{
next if $bin =~ m!bin/(ipcclean|pltcl_)!;
next unless -f $bin;
if (@err == 1) # Linux
{
@dumpout = `objdump -W $bin 2>/dev/null | egrep -A3
'(DW_TAG_typedef|DW_TAG_structure_type|DW_TAG_union_type)' 2>/dev/null`;
foreach (@dumpout)
{
@flds = split;
next if ($flds[0] ne 'DW_AT_name' || $flds[-1] =~
/^DW_FORM_str/);
$syms{$flds[-1]} =1;
}
}
else
{
@dumpout = `objdump --stabs $bin 2>/dev/null`;
foreach (@dumpout)
{
@flds = split;
next if ($flds[1] ne 'LSYM' || $flds[6] !~ /([^:]+):[tT]/);
$syms{$1} =1;
}
}
}
my @badsyms = grep { /\s/ } keys %syms;
push(@badsyms,'date','interval','timestamp','ANY');
delete @syms{(at)badsyms};

my @goodsyms = sort keys %syms;
map { s/$/\n/; } @goodsyms;

writelog('typedefs',\(at)goodsyms);

}

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2008-04-18 16:23:24 Re: Proposed patch - psql wraps at window width
Previous Message Gregory Stark 2008-04-18 16:21:26 Re: Proposed patch - psql wraps at window width