Skip to content
Open
Changes from all commits
Commits
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
8 changes: 5 additions & 3 deletions usdt-impl/src/stapsdt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,15 +153,15 @@ fn emit_probe_record(prov: &str, probe: &str, types: Option<&[DataType]>) -> Str
.popsection
.endif
// Second define the actual USDT probe
.pushsection .note.stapsdt, "", "note"
.pushsection .note.stapsdt, "o", "note", .Lprobe_{label}
.balign 4
.4byte 992f-991f, 994f-993f, 3 // length, type
991:
.asciz "stapsdt" // vendor string
992:
.balign 4
993:
.8byte 990b // probe PC address
.8byte .Lprobe_{label} // probe PC address
.8byte _.stapsdt.base // link-time sh_addr of base .stapsdt.base section
.8byte {sema_name} // probe semaphore address
.asciz "{prov}" // provider name
Expand Down Expand Up @@ -223,9 +223,11 @@ fn compile_probe(
#[allow(named_asm_labels)]
unsafe {
::std::arch::asm!(
"990: nop",
".Lprobe_{label}: nop",
#probe_rec,
#in_regs
// hack to get a unique label name.
label = label {},
options(nomem, nostack, preserves_flags)
);
}
Expand Down