-
Notifications
You must be signed in to change notification settings - Fork 5
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
Reading from arguments doesn't work with bpftrace #2
Comments
@NHDaly would be grand if you could try and reproduce this on Mac. |
Unfortunately the julia> function f(arg)
if @query(:julia, :test, typeof(arg))
@probe(:julia, :test, arg)
end
end
f (generic function with 1 method)
julia> while true
i = rand(Int64)
f(i)
end
<inline asm>:2:22: error: mach-o section specifier uses an unknown section type
.pushsection .note.stapsdt,"?","note"
^
<inline asm>:14:20: error: .popsection without corresponding .pushsection
.popsection
^
<inline asm>:16:22: error: mach-o section specifier uses an unknown section type
.pushsection .stapsdt.base,"aG","progbits",.stapsdt.base,comdat
^
<inline asm>:17:9: error: unknown directive
.weak _.stapsdt.base
^
<inline asm>:18:9: error: unknown directive
.hidden _.stapsdt.base
^
<inline asm>:20:9: error: unknown directive
.size _.stapsdt.base, 1
^
<inline asm>:21:20: error: .popsection without corresponding .pushsection
.popsection
^
<inline asm>:2:22: error: mach-o section specifier uses an unknown section type
.pushsection .note.stapsdt,"?","note"
^
<inline asm>:14:20: error: .popsection without corresponding .pushsection
.popsection
^
<inline asm>:16:22: error: mach-o section specifier uses an unknown section type
.pushsection .stapsdt.base,"aG","progbits",.stapsdt.base,comdat
^
<inline asm>:17:9: error: unknown directive
.weak _.stapsdt.base
^
<inline asm>:18:9: error: unknown directive
.hidden _.stapsdt.base
^
<inline asm>:20:9: error: unknown directive
.size _.stapsdt.base, 1
^
<inline asm>:21:20: error: .popsection without corresponding .pushsection
.popsection
^
<inline asm>:2:22: error: mach-o section specifier uses an unknown section type
.pushsection .note.stapsdt,"?","note"
^
<inline asm>:14:20: error: .popsection without corresponding .pushsection
.popsection
^
<inline asm>:16:22: error: mach-o section specifier uses an unknown section type
.pushsection .stapsdt.base,"aG","progbits",.stapsdt.base,comdat
^
<inline asm>:17:9: error: unknown directive
.weak _.stapsdt.base
^
<inline asm>:18:9: error: unknown directive
.hidden _.stapsdt.base
^
<inline asm>:20:9: error: unknown directive
.size _.stapsdt.base, 1
^
<inline asm>:21:20: error: .popsection without corresponding .pushsection
.popsection
^
<inline asm>:2:22: error: mach-o section specifier uses an unknown section type
.pushsection .note.stapsdt,"?","note"
^
<inline asm>:14:20: error: .popsection without corresponding .pushsection
.popsection
^
<inline asm>:16:22: error: mach-o section specifier uses an unknown section type
.pushsection .stapsdt.base,"aG","progbits",.stapsdt.base,comdat
^
<inline asm>:17:9: error: unknown directive
.weak _.stapsdt.base
^
<inline asm>:18:9: error: unknown directive
.hidden _.stapsdt.base
^
<inline asm>:20:9: error: unknown directive
.size _.stapsdt.base, 1
^
<inline asm>:21:20: error: .popsection without corresponding .pushsection
.popsection
^
ERROR: LLVM error: Error parsing inline asm
Stacktrace:
[1] handle_error(::Cstring) at /Users/nathan.daly/.julia/packages/LLVM/tg8MX/src/core/context.jl:103
[2] macro expansion at /Users/nathan.daly/.julia/packages/LLVM/tg8MX/src/base.jl:18 [inlined]
[3] LLVMTargetMachineEmitToFile(::Ptr{LLVM.API.LLVMOpaqueTargetMachine}, ::Ptr{LLVM.API.LLVMOpaqueModule}, ::String, ::UInt32, ::Base.RefValue{Cstring}) at /Users/nathan.daly/.julia/packages/LLVM/tg8MX/lib/6.0/libLLVM_h.jl:297
[4] emit at /Users/nathan.daly/.julia/packages/LLVM/tg8MX/src/targetmachine.jl:57 [inlined]
[5] (::getfield(UProbes, Symbol("##9#13")){LLVM.Module,String})(::LLVM.TargetMachine) at /Users/nathan.daly/.julia/packages/UProbes/199dD/src/UProbes.jl:164
[6] LLVM.TargetMachine(::getfield(UProbes, Symbol("##9#13")){LLVM.Module,String}, ::LLVM.Target, ::Vararg{Any,N} where N) at /Users/nathan.daly/.julia/packages/LLVM/tg8MX/src/targetmachine.jl:24
[7] #emit_probe#5(::String, ::typeof(UProbes.emit_probe), ::Symbol, ::Symbol, ::Tuple{DataType}) at /Users/nathan.daly/.julia/packages/UProbes/199dD/src/UProbes.jl:163
[8] emit_probe at /Users/nathan.daly/.julia/packages/UProbes/199dD/src/UProbes.jl:93 [inlined]
[9] cache_dl(::Symbol, ::Symbol, ::Tuple{DataType}) at /Users/nathan.daly/.julia/packages/UProbes/199dD/src/UProbes.jl:75
[10] #s13#4(::Any, ::Any, ::Any, ::Any, ::Type, ::Type, ::Any) at /Users/nathan.daly/.julia/packages/UProbes/199dD/src/UProbes.jl:64
[11] (::Core.GeneratedFunctionStub)(::Any, ::Vararg{Any,N} where N) at ./boot.jl:524
[12] f at ./REPL[10]:2 [inlined]
[13] top-level scope at ./REPL[11]:3 i'll putz with this now. |
Based on this random comment from the internet, it looks like the ASM is different for x86 gnu linux and x86 macos :( |
Ah that makes sense and I will need to figure out what the correct asm is for Mac/how dtrace probes look on Mac. |
Arguments are working now via bpftrace, at least on the LLVM 4 branch with Julia ~master. |
(Specifically on Linux) |
The text was updated successfully, but these errors were encountered: