Re: gcov coverage data not full with immediate stop

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: gcov coverage data not full with immediate stop
Дата
Msg-id 20200511034243.GA5671@alvherre.pgsql
обсуждение исходный текст
Ответ на gcov coverage data not full with immediate stop  (Alexander Lakhin <exclusion@gmail.com>)
Ответы Re: gcov coverage data not full with immediate stop  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: gcov coverage data not full with immediate stop  (Alexander Lakhin <exclusion@gmail.com>)
Список pgsql-hackers
(Strangely, I was just thinking about these branches of mine as I
closed my week last Friday...)

On 2020-May-10, Alexander Lakhin wrote:

> So if we want to make the coverage reports more precise, I see the three
> ways:
> 1. Change the stop mode in teardown_node to fast (probably only when
> configured with --enable-coverage);
> 2. Explicitly stop nodes in TAP tests (where it's important) -- seems
> too tedious and troublesome;
> 3. Explicitly call __gcov_flush in SIGQUIT handler (quickdie)?

I tried your idea 3 a long time ago and my experiments didn't show an
increase in coverage [1].  But I like this idea the best, and maybe I
did something wrong.  Attached is the patch I had (on top of
fc115d0f9fc6), but I don't know if it still applies.

(The second attachment is another branch I had on this, I don't remember
why; that one was on top of 438e51987dcc.  The curious thing is that I
didn't add the __gcov_flush to quickdie in this one.  Maybe what we need
is a mix of both.)

I think we should definitely get this fixed for pg13 ...

[1] https://postgr.es/m/20190531170503.GA24057@alvherre.pgsql

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andy Fan
Дата:
Сообщение: Re: No core file generated after PostgresNode->start
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Add -Wold-style-definition to CFLAGS?