-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#17993] docdb: Add stack trace tracking framework and I/O stack trac…
…e counting Summary: This diff adds a framework for counting occurrences of different stack traces, collected where ever `TrackStackTrace()` is executed. Unique stack traces are only ever symbolized at most once, and counts are collected in thread-local counters, in order to keep overhead moderate. Traces are placed into groups specified at the `TrackStackTrace()` call site, and an optional weight can be specified. Read and write syscalls performed through the abstractions in env.cc/file_system.cc are tracked through this in the kReadIO and kWriteIO groups, and the newly added `/io-stack-traces` server UI endpoint exposes this information, consisting of number of calls and number of bytes read (or written) through each trace. A separate new endpoint, `/debug-stack-traces` has also been added to list tracked stack traces in the kDebugging group, which is intended to be unused in committed code and added temporarily as needed through carefully placed `TrackStackTrace()` calls for debugging or investigation purposes. A third endpoint, `/reset-stack-traces` has been added to reset counters on tracked stack traces. Example output of `/io-stack-traces` endpoint: {img https://github.com/yugabyte/yugabyte-db/assets/6742815/5d29a85c-ba7d-40b3-b306-4655ca34d15c} All stack trace tracking is guarded behind the newly added `track_stack_traces` gflag, which is by default on in debug and off in release due to performance considerations (~5% degradation observed with sysbench). Jira: DB-7054 Test Plan: Jenkins. Also added DebugUtilTest.TestTrackedStackTraces: `./yb_build.sh --cxx-test util_debug-util-test --gtest_filter DebugUtilTest.TestTrackedStackTraces` Reviewers: asrivastava Reviewed By: asrivastava Subscribers: ybase Differential Revision: https://phorge.dev.yugabyte.com/D29116
- Loading branch information
Showing
9 changed files
with
397 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.