-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hbt/bperf: Let per thread reader handle lead exit event. (#317)
Summary: Pull Request resolved: #317 When the leader process exits, the per thread readers will not be able to read data. This is by design. The readers need to detect such event and renable the reader after the leader process comes back. An enabled_ flag is added to the reader. We need a heuristic algorithm to detect when the leader exits. Currently, the algorithm is simple: if we read same value for the first hardware counter twice, the leader is most likely gone. We may need to revisit this later. A unit test is added to cover this. We also need to adjust close() function of BPerfEventsGroup to make it easier for the reader to detect leader exit events. Reviewed By: Alston-Tang Differential Revision: D64486001 fbshipit-source-id: 1226e2109526e329cd14561b4faa1fb541181b75
- Loading branch information
1 parent
7761caa
commit bc3362d
Showing
4 changed files
with
133 additions
and
8 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