Re: Question for coverage report

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>
Cc: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, Álvaro Herrera <alvherre(at)kurilemu(dot)de>, Steven Niu <niushiji(at)gmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Question for coverage report
Date: 2025-10-22 15:51:46
Message-ID: 795389.1761148306@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com> writes:
> (I don't know the answer to this question, but I will note that clang
> (15.0.7) does not seem to make this mistake on my machine, and reports
> a call count of zero for the `return` on line 1495. Looking at the
> disassembly, it seems to add more instrumentation points than what Tom
> showed for gcc.)

Interesting. I also realized, after re-reading the snippet I showed,
that gcc is treating the code leading up to a CALL instruction as a
separate basic block from the code following the CALL. So that begs
the question of which count is shown for the function call's line
at the source-code level. It'd only differ when the function throws
an error, presumably.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2025-10-22 16:12:08 Re: Confine vacuum skip logic to lazy_scan_skip
Previous Message Álvaro Herrera 2025-10-22 15:49:43 Re: LISTEN/NOTIFY bug: VACUUM sets frozenxid past a xid in async queue