Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add minimal support for sampling #22

Closed
wants to merge 54 commits into from
Closed
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
4266ca9
First pass sampling bindings
Phantomical Nov 8, 2022
f816e07
Hide sampling behind an "unstable" feature
Phantomical Nov 8, 2022
cff0c36
Only put #[cfg(feature = "unstable")] on public API items
Phantomical Nov 8, 2022
bb97c9d
Remove useless pub(crate)
Phantomical Nov 8, 2022
4499097
Bring drop_guard into the crate
Phantomical Nov 8, 2022
4b3d9a1
Replace parse method parameters with ParseConfig
Phantomical Nov 8, 2022
289143d
Add support for MMAP records
Phantomical Nov 8, 2022
7fdede3
Add support for generating MMAP records to Builder
Phantomical Nov 8, 2022
558e394
Mark new methods as unstable
Phantomical Nov 8, 2022
886cd06
Parse records using native-endian integers, not big-endian
Phantomical Nov 9, 2022
e28fc3c
Add integration test for testing the mmap record
Phantomical Nov 9, 2022
46dd732
Move new methods to their own impl Builder block
Phantomical Nov 9, 2022
1e21a70
Allow creating Sample directly from the underlying bits
Phantomical Nov 9, 2022
0c2b3d8
Add `new` methods for `Samples` and `RecordMiscFlags`
Phantomical Nov 9, 2022
a390bb1
Add some more docs
Phantomical Nov 9, 2022
5b536c0
Formatting
Phantomical Nov 9, 2022
3a42222
Replace MmapMut with MmapRaw
Phantomical Nov 9, 2022
8a7c922
Rewrite Sampler::next to only read page through pointers
Phantomical Nov 9, 2022
6b1053c
Add Sampler::next_blocking
Phantomical Nov 9, 2022
6ecc31a
Add unit test for Mmap parsing
Phantomical Nov 9, 2022
3210d81
Formatting
Phantomical Nov 9, 2022
ca6a489
Doc tweaks
Phantomical Nov 10, 2022
92807d5
Reorganize some impls
Phantomical Nov 10, 2022
9a14d4a
Reorganize a bit more
Phantomical Nov 10, 2022
4d7dbbb
Fix a bug within ByteBuffer::advance and add some test cases
Phantomical Nov 11, 2022
5aa7d60
Silence warning when cfg(feature = "unstable") is disabled
Phantomical Nov 11, 2022
9f0e791
Tweak debug representations of RecordType and RecordCpuType
Phantomical Nov 11, 2022
6b10755
formatting
Phantomical Nov 11, 2022
f1d063f
Fix broken doc link on build_sampler
Phantomical Nov 11, 2022
e6498bd
Remove "unstable" feature.
jimblandy Nov 11, 2022
02b9c0d
Move Sample to the samples module
Phantomical Nov 12, 2022
890ddd7
Remove copied documentation from Sample
Phantomical Nov 12, 2022
5faa98c
Remove GPLv2 licensed documentation
Phantomical Nov 12, 2022
bc5f252
Remove drop order comment
Phantomical Nov 12, 2022
f038a3e
Delete more GPLv2 docs
Phantomical Nov 12, 2022
0d53313
Formatting
Phantomical Nov 12, 2022
19c15bc
Fix broken doc link
Phantomical Nov 12, 2022
eee3b71
Convert Deref and DerefMut impls to copy-paste
Phantomical Nov 13, 2022
fd744e4
Fix doctest on Builder::sample
Phantomical Nov 14, 2022
717fa29
Update bytes to use upstream master
Phantomical Nov 17, 2022
fac5864
Remove unsafe methods from test cases by using nix instead
Phantomical Nov 18, 2022
32eee0c
Make sure that next_blocking returns events present after POLLHUP
Phantomical Nov 19, 2022
9d542bb
Use imported path to bitflags macro
Phantomical Nov 20, 2022
e5e5a06
Update bytes dependency constraint to v1.3.0
Phantomical Nov 21, 2022
886b395
Remove Hex formatting from asserts which don't need it
Phantomical Nov 21, 2022
ce954ef
Avoid ever using std::os::unix::prelude module
Phantomical Nov 21, 2022
8491697
Rename Sampler::next -> Sampler::next_record
Phantomical Nov 21, 2022
ad04123
Fix cargo doc broken link warning
Phantomical Nov 22, 2022
9029052
Fix another broken doc link
Phantomical Nov 22, 2022
e31cab5
Fix bug in parsing SampleId
Phantomical Nov 26, 2022
4d82ee5
Rewrite Debug impl for SampleId
Phantomical Nov 27, 2022
acf7f69
Add some not-yet-documented variants to SampleType
Phantomical Nov 27, 2022
9c060b2
Add SampleType::AUX binding
Phantomical Nov 28, 2022
a617a9c
Update nix to version 0.26
Phantomical Dec 2, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions perf-event/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ default = ["hooks"]

[dependencies]
bitflags = "1.3"
bytes = { git = "https://github.com/phantomical/bytes", branch = "buf-ne" }
Phantomical marked this conversation as resolved.
Show resolved Hide resolved
libc = "0.2"
memmap2 = "0.5"
memoffset = "0.7.1"

[dependencies.perf-event-open-sys]
path = "../perf-event-open-sys"
Expand Down
Loading