From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Splitting up guc.c |
Date: | 2022-09-10 19:24:40 |
Message-ID: | 20220910192440.w4vgkx3kdoujaysq@awork3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On 2022-09-10 12:15:33 -0700, Andres Freund wrote:
> On 2022-09-10 15:04:59 -0400, Tom Lane wrote:
> > As things stand here, we have:
> >
> > 1. guc.c: the core GUC machinery.
> > 2. guc_tables.c: the data arrays, and some previously-exposed constant
> > tables. guc_tables.h can now be considered the associated header.
> > 3. guc_hooks.c: (most of) the per-variable check/assign/show hooks
> > that had been in guc.c. guc_hooks.h declares these.
> >
> > File sizes are like so:
> >
> > $ wc guc*c
> > 2629 9372 69467 guc-file.c
> > 7422 25136 202284 guc.c
> > 939 2693 22915 guc_hooks.c
> > 4877 13163 126769 guc_tables.c
> > 15867 50364 421435 total
> > $ size guc*o
> > text data bss dec hex filename
> > 13653 4 112 13769 35c9 guc-file.o
> > 54953 0 564 55517 d8dd guc.o
> > 6951 0 112 7063 1b97 guc_hooks.o
> > 43570 62998 216 106784 1a120 guc_tables.o
>
> A tad surprised by the text size of guc_tables.o - not that it is a problem,
> just seems a bit odd.
Looks like that's just size misgrouping some section. Built a guc_tables.o
without debug information (that makes the output too complicated):
$ size guc_tables_nodebug.o
text data bss dec hex filename
40044 66868 344 107256 1a2f8 guc_tables_nodebug.o
$ size --format=sysv guc_tables_nodebug.o
guc_tables_nodebug.o :
section size addr
.text 0 0
.data 52 0
.bss 344 0
.rodata 40044 0
.data.rel.ro.local 3720 0
.data.rel.local 8 0
.data.rel 63088 0
.comment 31 0
.note.GNU-stack 0 0
Total 107287
For some reason size adds .roata to the size for text in the default berkeley
style. Which is even documented:
The Berkeley style output counts read only data in the "text" column, not in the "data" column, the "dec" and "hex" columns both display the sum
of the "text", "data", and "bss" columns in decimal and hexadecimal respectively.
Greetings,
Andres Freund
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2022-09-10 19:35:05 | Re: Splitting up guc.c |
Previous Message | Tom Lane | 2022-09-10 19:23:40 | Re: Splitting up guc.c |