Skip to content

Dan's latest changes to diagnose slow commits.#2492

Merged
srikarparsi merged 3 commits intomainfrom
tyler-hctree-5a5b19ecf1fd5d55
Feb 4, 2026
Merged

Dan's latest changes to diagnose slow commits.#2492
srikarparsi merged 3 commits intomainfrom
tyler-hctree-5a5b19ecf1fd5d55

Conversation

@tylerkaraszewski
Copy link
Contributor

Details

Just the latest version of SQLite from Dan

Fixed Issues

https://github.com/Expensify/Expensify/issues/558782

Tests


Internal Testing Reminder: when changing bedrock, please compile auth against your new changes

@tylerkaraszewski tylerkaraszewski requested a review from a team February 2, 2026 17:11
@tylerkaraszewski tylerkaraszewski self-assigned this Feb 2, 2026
@melvin-bot melvin-bot bot requested review from srikarparsi and removed request for a team February 2, 2026 17:11
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e8fedec260

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 89634 to 89637
static sqlite3_uint64 hctRdtscTime(void){
unsigned int lo, hi;
__asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi));
return (sqlite_uint64)hi << 32 | lo;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Guard rdtsc asm for non-x86 builds

This new hctRdtscTime() uses unguarded GCC inline rdtsc, but HCT_ENABLE_COMMIT_TIMERS is defined unconditionally in this amalgamation. On non‑x86 targets (e.g., arm64) or non‑GCC compilers, this will fail to compile because rdtsc/inline asm is unsupported. Previously the sqlite3Hwtime() helper selected a safe fallback or architecture-specific implementation. Consider restoring the guarded helper or adding the same architecture checks here.

Useful? React with 👍 / 👎.

Comment on lines 281992 to 281995
static sqlite3_uint64 hctDbRdtscTime(void){
unsigned int lo, hi;
__asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi));
return (sqlite_uint64)hi << 32 | lo;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Unconditional rdtsc in DB timers breaks non-x86 builds

The DB timer macro now depends on hctDbRdtscTime() which is hardwired to rdtsc via GCC inline asm. Because HCT_ENABLE_COMMIT_TIMERS is always enabled in this file, this introduces the same portability/build break on non‑x86 or non‑GCC toolchains. The prior sqlite3Hwtime() implementation included architecture fallbacks; this function should be similarly guarded or replaced.

Useful? React with 👍 / 👎.

@srikarparsi
Copy link
Contributor

Hey @tylerkaraszewski, do the above comments matter? I'm not too familiar with this area of the code

@tylerkaraszewski
Copy link
Contributor Author

@srikarparsi - I'm addressing with dan @ sqlite. I'll ping you agan when resolved, thanks!

@tylerkaraszewski
Copy link
Contributor Author

@srikarparsi - this is ready for re-review. Discussed with Dan and all we need is a compiler setting change instead.

@srikarparsi srikarparsi merged commit 9f3df14 into main Feb 4, 2026
8 checks passed
@srikarparsi srikarparsi deleted the tyler-hctree-5a5b19ecf1fd5d55 branch February 4, 2026 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants