ruby-static-tracing 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,69 @@
1
+ /*
2
+ * Copyright (c) 2012, Chris Andrews. All rights reserved.
3
+ */
4
+
5
+ /*
6
+ * Stub functions containing DTrace tracepoints for probes and
7
+ * is-enabled probes. These functions are copied for each probe
8
+ * dynamically created.
9
+ *
10
+ */
11
+ .text
12
+
13
+ .align 4, 0x90
14
+ .globl usdt_tracepoint_isenabled
15
+ .globl _usdt_tracepoint_isenabled
16
+ .globl usdt_tracepoint_probe
17
+ .globl _usdt_tracepoint_probe
18
+ .globl usdt_tracepoint_end
19
+ .globl _usdt_tracepoint_end
20
+ .globl usdt_probe_args
21
+ .globl _usdt_probe_args
22
+
23
+ usdt_tracepoint_isenabled:
24
+ _usdt_tracepoint_isenabled:
25
+ pushl %ebp
26
+ movl %esp, %ebp
27
+ subl $8, %esp
28
+ xorl %eax, %eax
29
+ nop
30
+ nop
31
+ leave
32
+ ret
33
+ usdt_tracepoint_probe:
34
+ _usdt_tracepoint_probe:
35
+ nop
36
+ nop
37
+ nop
38
+ nop
39
+ nop
40
+ addl $0x20,%esp
41
+ leave
42
+ usdt_tracepoint_end:
43
+ _usdt_tracepoint_end:
44
+ ret
45
+
46
+ /*
47
+ * Probe argument marshalling, i386 style
48
+ *
49
+ */
50
+
51
+ usdt_probe_args:
52
+ _usdt_probe_args:
53
+ pushl %ebp
54
+ movl %esp,%ebp
55
+ subl $8,%esp
56
+ subl $8,%esp
57
+ movl 8(%ebp),%edx
58
+ movl 0xc(%ebp),%ecx
59
+ test %ecx,%ecx
60
+ je fire
61
+ args: movl %ecx,%eax
62
+ sal $2,%eax
63
+ subl $4,%eax
64
+ addl 0x10(%ebp),%eax
65
+ pushl (%eax)
66
+ dec %ecx
67
+ jne args
68
+ fire: jmp *%edx
69
+
@@ -0,0 +1,123 @@
1
+ /*
2
+ * Copyright (c) 2012, Chris Andrews. All rights reserved.
3
+ */
4
+
5
+ /*
6
+ * Stub functions containing DTrace tracepoints for probes and
7
+ * is-enabled probes. These functions are copied for each probe
8
+ * dynamically created.
9
+ *
10
+ */
11
+ .text
12
+
13
+ .align 4, 0x90
14
+ .globl usdt_tracepoint_isenabled
15
+ .globl _usdt_tracepoint_isenabled
16
+ .globl usdt_tracepoint_probe
17
+ .globl _usdt_tracepoint_probe
18
+ .globl usdt_tracepoint_end
19
+ .globl _usdt_tracepoint_end
20
+ .globl usdt_probe_args
21
+ .globl _usdt_probe_args
22
+
23
+ usdt_tracepoint_isenabled:
24
+ _usdt_tracepoint_isenabled:
25
+ pushq %rbp
26
+ movq %rsp, %rbp
27
+ addq $1, %rax
28
+ xorq %rax, %rax
29
+ nop
30
+ nop
31
+ leave
32
+ ret
33
+ usdt_tracepoint_probe:
34
+ _usdt_tracepoint_probe:
35
+ nop
36
+ nop
37
+ nop
38
+ nop
39
+ nop
40
+ addq %r14,%rsp
41
+ popq %rbx
42
+ popq %r14
43
+ popq %r13
44
+ popq %r12
45
+ leave
46
+ usdt_tracepoint_end:
47
+ _usdt_tracepoint_end:
48
+ ret
49
+
50
+ /*
51
+ * Probe argument marshalling, x86_64 style
52
+ *
53
+ */
54
+
55
+ usdt_probe_args:
56
+ _usdt_probe_args:
57
+ pushq %rbp
58
+ movq %rsp,%rbp
59
+ pushq %r12
60
+ pushq %r13
61
+ pushq %r14
62
+ pushq %rbx
63
+
64
+ movq %rdi,%r12
65
+ movq %rsi,%rbx
66
+ movq %rdx,%r11
67
+ movq $0,%r14
68
+
69
+ test %rbx,%rbx
70
+ je fire
71
+ movq (%r11),%rdi
72
+ dec %rbx
73
+ test %rbx,%rbx
74
+ je fire
75
+ addq $8,%r11
76
+ movq (%r11),%rsi
77
+ dec %rbx
78
+ test %rbx,%rbx
79
+ je fire
80
+ addq $8,%r11
81
+ movq (%r11),%rdx
82
+ dec %rbx
83
+ test %rbx,%rbx
84
+ je fire
85
+ addq $8,%r11
86
+ movq (%r11),%rcx
87
+ dec %rbx
88
+ test %rbx,%rbx
89
+ je fire
90
+ addq $8,%r11
91
+ movq (%r11),%r8
92
+ dec %rbx
93
+ test %rbx,%rbx
94
+ je fire
95
+ addq $8,%r11
96
+ movq (%r11),%r9
97
+
98
+ movq %rbx,%r13
99
+ morestack:
100
+ dec %rbx
101
+ test %rbx,%rbx
102
+ je args
103
+ subq $16,%rsp
104
+ addq $16,%r14
105
+ dec %rbx
106
+ test %rbx,%rbx
107
+ je args
108
+ jmp morestack
109
+
110
+ args:
111
+ movq %r13,%rbx
112
+ movq $0,%r13
113
+ moreargs:
114
+ dec %rbx
115
+ test %rbx,%rbx
116
+ je fire
117
+ addq $8,%r11
118
+ movq (%r11),%rax
119
+ movq %rax,(%rsp,%r13)
120
+ addq $8,%r13
121
+ jmp moreargs
122
+
123
+ fire: jmp *%r12
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module StaticTracing
4
- VERSION = '0.0.4'
4
+ VERSION = '0.0.5'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-static-tracing
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dale Hamel
@@ -80,8 +80,9 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
- description: " A Ruby C extension that enables defining static tracepoints\n from
84
- within a ruby context. \n"
83
+ description: |2
84
+ A Ruby C extension that enables defining static tracepoints
85
+ from within a ruby context.
85
86
  email: dale.hamel@srvthe.net
86
87
  executables: []
87
88
  extensions:
@@ -98,7 +99,9 @@ files:
98
99
  - ext/ruby-static-tracing/extconf.rb
99
100
  - ext/ruby-static-tracing/include/ruby_static_tracing.h
100
101
  - ext/ruby-static-tracing/lib/deps-extconf.rb
102
+ - ext/ruby-static-tracing/lib/libstapsdt/Makefile
101
103
  - ext/ruby-static-tracing/lib/libstapsdt/example/demo.c
104
+ - ext/ruby-static-tracing/lib/libstapsdt/src/asm/libstapsdt-x86_64.s
102
105
  - ext/ruby-static-tracing/lib/libstapsdt/src/dynamic-symbols.c
103
106
  - ext/ruby-static-tracing/lib/libstapsdt/src/dynamic-symbols.h
104
107
  - ext/ruby-static-tracing/lib/libstapsdt/src/errors.c
@@ -119,6 +122,18 @@ files:
119
122
  - ext/ruby-static-tracing/lib/libstapsdt/src/util.h
120
123
  - ext/ruby-static-tracing/lib/libstapsdt/tests/test-errors.c
121
124
  - ext/ruby-static-tracing/lib/libstapsdt/tests/test-memory-leaks.c
125
+ - ext/ruby-static-tracing/lib/libusdt/Makefile
126
+ - ext/ruby-static-tracing/lib/libusdt/test_mem_usage.c
127
+ - ext/ruby-static-tracing/lib/libusdt/test_usdt.c
128
+ - ext/ruby-static-tracing/lib/libusdt/usdt.c
129
+ - ext/ruby-static-tracing/lib/libusdt/usdt.h
130
+ - ext/ruby-static-tracing/lib/libusdt/usdt_dof.c
131
+ - ext/ruby-static-tracing/lib/libusdt/usdt_dof_file.c
132
+ - ext/ruby-static-tracing/lib/libusdt/usdt_dof_sections.c
133
+ - ext/ruby-static-tracing/lib/libusdt/usdt_internal.h
134
+ - ext/ruby-static-tracing/lib/libusdt/usdt_probe.c
135
+ - ext/ruby-static-tracing/lib/libusdt/usdt_tracepoints_i386.s
136
+ - ext/ruby-static-tracing/lib/libusdt/usdt_tracepoints_x86_64.s
122
137
  - ext/ruby-static-tracing/lib/post-extconf.rb
123
138
  - ext/ruby-static-tracing/linux/provider.c
124
139
  - ext/ruby-static-tracing/linux/provider.h
@@ -139,7 +154,7 @@ files:
139
154
  - lib/ruby-static-tracing/tracers/latency_tracer.rb
140
155
  - lib/ruby-static-tracing/tracers/stack_tracer.rb
141
156
  - lib/ruby-static-tracing/version.rb
142
- homepage: https://github.com/dalehamel/ruby-static-tracing
157
+ homepage: https://github.com/shopify/ruby-static-tracing
143
158
  licenses:
144
159
  - MIT
145
160
  metadata: {}