-
Notifications
You must be signed in to change notification settings - Fork 968
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add
--allocator_tracker
for default tracking (#3901)
* chore: Add `--allocator_tracker` for default tracking Before, in order to use allocation tracker, one had to issue a `MEMORY TRACK` command. This flag is identical to that, but allows starting Dragonfly with certain ranges without issuing a command. While here, fix a bug. Apparently, `absl::InlinedVector<>` has a bug in the implementation of `max_size()` and so in practice we did not limit the number of trackers. I switched to use `capacity()` instead, which I tested and it works well. Notes: 1. Currently the flag always add 100% "sampling", we can extend that in the future if need be 2. I added the flag in `dfly_main.cc` with custom initialization, because it's low level, and I couldn't get it reasonably working with changes only to `allocation_tracker.cc` * fixes
- Loading branch information
Showing
2 changed files
with
42 additions
and
1 deletion.
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