Re: Reduce timing overhead of EXPLAIN ANALYZE using rdtsc?
David Geier <geidav.pg@gmail.com>
From: David Geier <geidav.pg@gmail.com>
To: vignesh C <vignesh21@gmail.com>
Cc: Lukas Fittl <lukas@fittl.com>, Michael Paquier <michael@paquier.xyz>,
Ibrar Ahmed <ibrar.ahmad@gmail.com>, Maciek Sakrejda <m.sakrejda@gmail.com>,
Andres Freund <andres@anarazel.de>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2023-01-04T12:02:05Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
pg_test_timing: Also test RDTSC[P] timing, report time source, TSC frequency
- 16fca4825483 19 (unreleased) landed
-
Allow retrieving x86 TSC frequency/flags from CPUID
- bcb2cf41f964 19 (unreleased) landed
-
instrumentation: Standardize ticks to nanosecond conversion method
- 0022622c93d9 19 (unreleased) landed
-
instrumentation: Use Time-Stamp Counter on x86-64 to lower overhead
- 294520c44487 19 (unreleased) landed
-
Zero initialize uses of instr_time about to trigger compiler warnings
- 25b2aba0c3a5 16.0 landed
-
instr_time: Represent time as an int64 on all platforms
- 03023a2664f8 16.0 landed
-
Add 250c8ee07ed to git-blame-ignore-revs
- ff23b592ad66 16.0 cited
Attachments
- 0001-Change-instr_time-to-just-store-nanoseconds-v6.patch (text/x-patch) patch v6-0001
- 0002-Use-CPU-reference-cycles-via-RDTSC-to-measure-time-v6.patch (text/x-patch) patch v6-0002
- 0003-Refactor-some-instr_time-related-code-v6.patch (text/x-patch) patch v6-0003
Hi, > CFBot shows some compilation errors as in [1], please post an updated > version for the same: > 09:08:12.525] /usr/bin/ld: > src/bin/pg_test_timing/pg_test_timing.p/pg_test_timing.c.o: warning: > relocation against `cycles_to_sec' in read-only section `.text' > [09:08:12.525] /usr/bin/ld: > src/bin/pg_test_timing/pg_test_timing.p/pg_test_timing.c.o: in > function `pg_clock_gettime_ref_cycles': > [09:08:12.525] /tmp/cirrus-ci-build/build/../src/include/portability/instr_time.h:119: > undefined reference to `use_rdtsc' > [09:08:12.525] /usr/bin/ld: > src/bin/pg_test_timing/pg_test_timing.p/pg_test_timing.c.o: in > function `test_timing': > [09:08:12.525] /tmp/cirrus-ci-build/build/../src/bin/pg_test_timing/pg_test_timing.c:135: > undefined reference to `pg_clock_gettime_initialize_rdtsc' > [09:08:12.525] /usr/bin/ld: > /tmp/cirrus-ci-build/build/../src/bin/pg_test_timing/pg_test_timing.c:137: > undefined reference to `cycles_to_us' > [09:08:12.525] /usr/bin/ld: > /tmp/cirrus-ci-build/build/../src/bin/pg_test_timing/pg_test_timing.c:146: > undefined reference to `cycles_to_us' > [09:08:12.525] /usr/bin/ld: > /tmp/cirrus-ci-build/build/../src/bin/pg_test_timing/pg_test_timing.c:169: > undefined reference to `cycles_to_us' > [09:08:12.525] /usr/bin/ld: > /tmp/cirrus-ci-build/build/../src/bin/pg_test_timing/pg_test_timing.c:176: > undefined reference to `cycles_to_sec' > [09:08:12.525] /usr/bin/ld: warning: creating DT_TEXTREL in a PIE > [09:08:12.525] collect2: error: ld returned 1 exit status > > [1] - https://cirrus-ci.com/task/5375312565895168 > > Regards, > Vignesh I fixed the compilation error on CFBot. I missed adding instr_time.c to the Meson makefile. New patch set attached. -- David Geier (ServiceNow)