Investigate hooking into spinlock for delay statistics in new tcmalloc

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Won't Do
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Service Arch
    • Service Arch 2024-04-01
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In the new version of tcmalloc, the spinlock_total_delay_ns statistics is not available at all. This statistic has been useful for diagnosing tcmalloc issues in the past, and so it is too bad that the new tcmalloc has removed this metric.

      However, abseil's spinlock implementation, which is used by tcmalloc, does allow us to hook into and profile a spinlock (https://github.com/mongodb/mongo/blob/5e0f333d011b973fc7d44f48bbd0fc6ea34b6be1/src/third_party/abseil-cpp/dist/absl/base/internal/spinlock.h#L214C6-L215). We should investigate using this to get the spinlock delay information, and also ensure that using it does not cause a performance hit to the allocator.

            Assignee:
            Erin McNulty
            Reporter:
            Erin McNulty
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: