fiber-profiler 0.3.0 → 0.4.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 763fd680dafd595bcfdb69ffcac3161ab2c21ffe4ddeb54110d30b26af78c645
4
- data.tar.gz: 7619a44d197a88b4ecb2f24e3e48a4d4e8a660f7fc9bd1d6cc0482bad45df92f
3
+ metadata.gz: 64e27c2a0ba665e441f7fa4e89044961c777572bc9a47bf9d3a25db83b3e6b90
4
+ data.tar.gz: 514104f2792a95d4262e99adec6108d36e7d9c0b1ea927ffed4fadc8cfae5836
5
5
  SHA512:
6
- metadata.gz: 968cc396e79c7030a7fa2d384b21dd0491f4d4ea03c2173cfe1c1081d982cc6976ba32c023a676deab5dfc748b1dbc320d9f1087f41532249484f647a62b1f94
7
- data.tar.gz: 1b68a1bfccf03defd375fe90da755b33fd9da19155bfac3b7b03208a664075c3469518077c0270102f36f07b44b4016ce8fd96dd1969701370f14ccd526816b3
6
+ metadata.gz: 3501a3d76137aa083c27c1f552171ea07915a1ac87c10d16b3d0cb2ff5dd11a48b0f7cb353aaa7b1c452b5d2251b8d2a46fa52178f9f50a66c4d0b100253bc9b
7
+ data.tar.gz: e42ef50211f27eccbdb83eb7682fd736fbc6e40a082de68d0b4e34f65f8820c97f9132ef5ed922b8c31a35906cfac1e380d0510a2c2f3f727c234e0417071e6e
checksums.yaml.gz.sig CHANGED
Binary file
Binary file
@@ -0,0 +1,20 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>CFBundleDevelopmentRegion</key>
6
+ <string>English</string>
7
+ <key>CFBundleIdentifier</key>
8
+ <string>com.apple.xcode.dsym.Fiber_Profiler.bundle</string>
9
+ <key>CFBundleInfoDictionaryVersion</key>
10
+ <string>6.0</string>
11
+ <key>CFBundlePackageType</key>
12
+ <string>dSYM</string>
13
+ <key>CFBundleSignature</key>
14
+ <string>????</string>
15
+ <key>CFBundleShortVersionString</key>
16
+ <string>1.0</string>
17
+ <key>CFBundleVersion</key>
18
+ <string>1</string>
19
+ </dict>
20
+ </plist>
@@ -0,0 +1,5 @@
1
+ ---
2
+ triple: 'arm64-apple-darwin'
3
+ binary-path: Fiber_Profiler.bundle
4
+ relocations: []
5
+ ...
data/ext/Makefile ADDED
@@ -0,0 +1,273 @@
1
+
2
+ SHELL = /bin/sh
3
+
4
+ # V=0 quiet, V=1 verbose. other values don't work.
5
+ V = 0
6
+ V0 = $(V:0=)
7
+ Q1 = $(V:1=)
8
+ Q = $(Q1:0=@)
9
+ ECHO1 = $(V:1=@ :)
10
+ ECHO = $(ECHO1:0=@ echo)
11
+ NULLCMD = :
12
+
13
+ #### Start of system configuration section. ####
14
+
15
+ srcdir = .
16
+ topdir = /Users/samuel/.rubies/ruby-3.4.2/include/ruby-3.4.0
17
+ hdrdir = $(topdir)
18
+ arch_hdrdir = /Users/samuel/.rubies/ruby-3.4.2/include/ruby-3.4.0/arm64-darwin24
19
+ PATH_SEPARATOR = :
20
+ VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby:$(srcdir)/fiber/profiler
21
+ prefix = $(DESTDIR)/Users/samuel/.rubies/ruby-3.4.2
22
+ rubysitearchprefix = $(rubylibprefix)/$(sitearch)
23
+ rubyarchprefix = $(rubylibprefix)/$(arch)
24
+ rubylibprefix = $(libdir)/$(RUBY_BASE_NAME)
25
+ exec_prefix = $(prefix)
26
+ vendorarchhdrdir = $(vendorhdrdir)/$(sitearch)
27
+ sitearchhdrdir = $(sitehdrdir)/$(sitearch)
28
+ rubyarchhdrdir = $(rubyhdrdir)/$(arch)
29
+ vendorhdrdir = $(rubyhdrdir)/vendor_ruby
30
+ sitehdrdir = $(rubyhdrdir)/site_ruby
31
+ rubyhdrdir = $(includedir)/$(RUBY_VERSION_NAME)
32
+ vendorarchdir = $(vendorlibdir)/$(sitearch)
33
+ vendorlibdir = $(vendordir)/$(ruby_version)
34
+ vendordir = $(rubylibprefix)/vendor_ruby
35
+ sitearchdir = $(sitelibdir)/$(sitearch)
36
+ sitelibdir = $(sitedir)/$(ruby_version)
37
+ sitedir = $(rubylibprefix)/site_ruby
38
+ rubyarchdir = $(rubylibdir)/$(arch)
39
+ rubylibdir = $(rubylibprefix)/$(ruby_version)
40
+ sitearchincludedir = $(includedir)/$(sitearch)
41
+ archincludedir = $(includedir)/$(arch)
42
+ sitearchlibdir = $(libdir)/$(sitearch)
43
+ archlibdir = $(libdir)/$(arch)
44
+ ridir = $(datarootdir)/$(RI_BASE_NAME)
45
+ modular_gc_dir = $(DESTDIR)
46
+ mandir = $(datarootdir)/man
47
+ localedir = $(datarootdir)/locale
48
+ libdir = $(exec_prefix)/lib
49
+ psdir = $(docdir)
50
+ pdfdir = $(docdir)
51
+ dvidir = $(docdir)
52
+ htmldir = $(docdir)
53
+ infodir = $(datarootdir)/info
54
+ docdir = $(datarootdir)/doc/$(PACKAGE)
55
+ oldincludedir = $(DESTDIR)/usr/include
56
+ includedir = $(SDKROOT)$(prefix)/include
57
+ runstatedir = $(localstatedir)/run
58
+ localstatedir = $(prefix)/var
59
+ sharedstatedir = $(prefix)/com
60
+ sysconfdir = $(prefix)/etc
61
+ datadir = $(datarootdir)
62
+ datarootdir = $(prefix)/share
63
+ libexecdir = $(exec_prefix)/libexec
64
+ sbindir = $(exec_prefix)/sbin
65
+ bindir = $(exec_prefix)/bin
66
+ archdir = $(rubyarchdir)
67
+
68
+
69
+ CC_WRAPPER =
70
+ CC = clang
71
+ CXX = clang++ -std=gnu++11
72
+ LIBRUBY = $(LIBRUBY_A)
73
+ LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
74
+ LIBRUBYARG_SHARED =
75
+ LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static -framework CoreFoundation $(MAINLIBS)
76
+ empty =
77
+ OUTFLAG = -o $(empty)
78
+ COUTFLAG = -o $(empty)
79
+ CSRCFLAG = $(empty)
80
+
81
+ RUBY_EXTCONF_H = extconf.h
82
+ cflags = $(hardenflags) -fdeclspec $(optflags) $(debugflags) $(warnflags)
83
+ cxxflags =
84
+ optflags = -O3 -fno-fast-math
85
+ debugflags = -ggdb3
86
+ warnflags = -Wall -Wextra -Wextra-tokens -Wdeprecated-declarations -Wdivision-by-zero -Wdiv-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wmisleading-indentation -Wundef
87
+ cppflags =
88
+ CCDLFLAGS = -fno-common
89
+ CFLAGS = $(CCDLFLAGS) $(cflags) -pipe -Wall -Wno-unknown-pragmas -std=c99 $(ARCH_FLAG)
90
+ INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
91
+ DEFS =
92
+ CPPFLAGS = -DRUBY_EXTCONF_H=\"$(RUBY_EXTCONF_H)\" -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT $(DEFS) $(cppflags)
93
+ CXXFLAGS = $(CCDLFLAGS) -fdeclspec $(ARCH_FLAG)
94
+ ldflags = -L. -fstack-protector-strong -L/opt/local/lib
95
+ dldflags = -L/opt/local/lib -Wl,-undefined,dynamic_lookup -bundle_loader '$(BUILTRUBY)'
96
+ ARCH_FLAG = -arch arm64
97
+ DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG)
98
+ LDSHARED = $(CC) -dynamic -bundle
99
+ LDSHAREDXX = $(CXX) -dynamic -bundle
100
+ POSTLINK = dsymutil $@ 2>/dev/null; { test -z '$(RUBY_CODESIGN)' || codesign -s '$(RUBY_CODESIGN)' $@; }
101
+ AR = ar
102
+ LD = ld
103
+ EXEEXT =
104
+
105
+ RUBY_INSTALL_NAME = $(RUBY_BASE_NAME)
106
+ RUBY_SO_NAME = ruby.3.4
107
+ RUBYW_INSTALL_NAME =
108
+ RUBY_VERSION_NAME = $(RUBY_BASE_NAME)-$(ruby_version)
109
+ RUBYW_BASE_NAME = rubyw
110
+ RUBY_BASE_NAME = ruby
111
+
112
+ arch = arm64-darwin24
113
+ sitearch = $(arch)
114
+ ruby_version = 3.4.0
115
+ ruby = $(bindir)/$(RUBY_BASE_NAME)
116
+ RUBY = $(ruby)
117
+ BUILTRUBY = $(bindir)/$(RUBY_BASE_NAME)
118
+ ruby_headers = $(hdrdir)/ruby.h $(hdrdir)/ruby/backward.h $(hdrdir)/ruby/ruby.h $(hdrdir)/ruby/defines.h $(hdrdir)/ruby/missing.h $(hdrdir)/ruby/intern.h $(hdrdir)/ruby/st.h $(hdrdir)/ruby/subst.h $(arch_hdrdir)/ruby/config.h $(RUBY_EXTCONF_H)
119
+
120
+ RM = rm -f
121
+ RM_RF = rm -fr
122
+ RMDIRS = rmdir -p
123
+ MAKEDIRS = /opt/local/bin/gmkdir -p
124
+ INSTALL = /opt/local/bin/ginstall -c
125
+ INSTALL_PROG = $(INSTALL) -m 0755
126
+ INSTALL_DATA = $(INSTALL) -m 644
127
+ COPY = cp
128
+ TOUCH = exit >
129
+
130
+ #### End of system configuration section. ####
131
+
132
+ preload =
133
+ libpath = . $(libdir) /opt/local/lib
134
+ LIBPATH = -L. -L$(libdir) -L/opt/local/lib
135
+ DEFFILE =
136
+
137
+ CLEANFILES = mkmf.log
138
+ DISTCLEANFILES =
139
+ DISTCLEANDIRS =
140
+
141
+ extout =
142
+ extout_prefix =
143
+ target_prefix =
144
+ LOCAL_LIBS =
145
+ LIBS = -lpthread
146
+ ORIG_SRCS =
147
+ SRCS = $(ORIG_SRCS) profiler.c time.c fiber.c capture.c
148
+ OBJS = profiler.o time.o fiber.o capture.o
149
+ HDRS = $(srcdir)/extconf.h
150
+ LOCAL_HDRS =
151
+ TARGET = Fiber_Profiler
152
+ TARGET_NAME = Fiber_Profiler
153
+ TARGET_ENTRY = Init_$(TARGET_NAME)
154
+ DLLIB = $(TARGET).bundle
155
+ EXTSTATIC =
156
+ STATIC_LIB =
157
+
158
+ TIMESTAMP_DIR = .
159
+ BINDIR = $(bindir)
160
+ RUBYCOMMONDIR = $(sitedir)$(target_prefix)
161
+ RUBYLIBDIR = $(sitelibdir)$(target_prefix)
162
+ RUBYARCHDIR = $(sitearchdir)$(target_prefix)
163
+ HDRDIR = $(sitehdrdir)$(target_prefix)
164
+ ARCHHDRDIR = $(sitearchhdrdir)$(target_prefix)
165
+ TARGET_SO_DIR =
166
+ TARGET_SO = $(TARGET_SO_DIR)$(DLLIB)
167
+ CLEANLIBS = $(TARGET_SO) $(TARGET_SO:=.dSYM)
168
+ CLEANOBJS = $(OBJS) *.bak
169
+ TARGET_SO_DIR_TIMESTAMP = $(TIMESTAMP_DIR)/.sitearchdir.time
170
+
171
+ all: $(DLLIB)
172
+ static: $(STATIC_LIB)
173
+ .PHONY: all install static install-so install-rb
174
+ .PHONY: clean clean-so clean-static clean-rb
175
+
176
+ clean-static::
177
+ clean-rb-default::
178
+ clean-rb::
179
+ clean-so::
180
+ clean: clean-so clean-static clean-rb-default clean-rb
181
+ -$(Q)$(RM_RF) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES) .*.time
182
+
183
+ distclean-rb-default::
184
+ distclean-rb::
185
+ distclean-so::
186
+ distclean-static::
187
+ distclean: clean distclean-so distclean-static distclean-rb-default distclean-rb
188
+ -$(Q)$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
189
+ -$(Q)$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
190
+ -$(Q)$(RMDIRS) $(DISTCLEANDIRS) 2> /dev/null || true
191
+
192
+ realclean: distclean
193
+ install: install-so install-rb
194
+
195
+ install-so: $(DLLIB) $(TARGET_SO_DIR_TIMESTAMP)
196
+ $(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
197
+ clean-static::
198
+ -$(Q)$(RM) $(STATIC_LIB)
199
+ install-rb: pre-install-rb do-install-rb install-rb-default
200
+ install-rb-default: pre-install-rb-default do-install-rb-default
201
+ pre-install-rb: Makefile
202
+ pre-install-rb-default: Makefile
203
+ do-install-rb:
204
+ do-install-rb-default:
205
+ pre-install-rb-default:
206
+ @$(NULLCMD)
207
+ $(TARGET_SO_DIR_TIMESTAMP):
208
+ $(Q) $(MAKEDIRS) $(@D) $(RUBYARCHDIR)
209
+ $(Q) $(TOUCH) $@
210
+
211
+ site-install: site-install-so site-install-rb
212
+ site-install-so: install-so
213
+ site-install-rb: install-rb
214
+
215
+ .SUFFIXES: .c .m .cc .mm .cxx .cpp .o .S
216
+
217
+ .cc.o:
218
+ $(ECHO) compiling $(<)
219
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
220
+
221
+ .cc.S:
222
+ $(ECHO) translating $(<)
223
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
224
+
225
+ .mm.o:
226
+ $(ECHO) compiling $(<)
227
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
228
+
229
+ .mm.S:
230
+ $(ECHO) translating $(<)
231
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
232
+
233
+ .cxx.o:
234
+ $(ECHO) compiling $(<)
235
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
236
+
237
+ .cxx.S:
238
+ $(ECHO) translating $(<)
239
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
240
+
241
+ .cpp.o:
242
+ $(ECHO) compiling $(<)
243
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
244
+
245
+ .cpp.S:
246
+ $(ECHO) translating $(<)
247
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
248
+
249
+ .c.o:
250
+ $(ECHO) compiling $(<)
251
+ $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
252
+
253
+ .c.S:
254
+ $(ECHO) translating $(<)
255
+ $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
256
+
257
+ .m.o:
258
+ $(ECHO) compiling $(<)
259
+ $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
260
+
261
+ .m.S:
262
+ $(ECHO) translating $(<)
263
+ $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
264
+
265
+ $(TARGET_SO): $(OBJS) Makefile
266
+ $(ECHO) linking shared-object $(DLLIB)
267
+ -$(Q)$(RM) $(@)
268
+ $(Q) $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
269
+ $(Q) $(POSTLINK)
270
+
271
+
272
+
273
+ $(OBJS): $(HDRS) $(ruby_headers)
data/ext/capture.o ADDED
Binary file
data/ext/extconf.h ADDED
@@ -0,0 +1,5 @@
1
+ #ifndef EXTCONF_H
2
+ #define EXTCONF_H
3
+ #define HAVE_RB_FIBER_CURRENT 1
4
+ #define HAVE_RB_EXT_RACTOR_SAFE 1
5
+ #endif
data/ext/extconf.rb CHANGED
@@ -9,12 +9,12 @@ require "mkmf"
9
9
  gem_name = File.basename(__dir__)
10
10
  extension_name = "Fiber_Profiler"
11
11
 
12
- $CFLAGS << " -Wall -Wno-unknown-pragmas -std=c99"
12
+ append_cflags(["-Wall", "-Wno-unknown-pragmas", "-std=c99"])
13
13
 
14
14
  if ENV.key?("RUBY_DEBUG")
15
15
  $stderr.puts "Enabling debug mode..."
16
16
 
17
- $CFLAGS << " -DRUBY_DEBUG -O0"
17
+ append_cflags(["-DRUBY_DEBUG", "-O0"])
18
18
  end
19
19
 
20
20
  $srcs = ["fiber/profiler/profiler.c", "fiber/profiler/time.c", "fiber/profiler/fiber.c", "fiber/profiler/capture.c"]
@@ -586,11 +586,11 @@ void Fiber_Profiler_Capture_fiber_switch(VALUE self)
586
586
  struct Fiber_Profiler_Capture *capture = Fiber_Profiler_Capture_get(self);
587
587
  capture->switches += 1;
588
588
 
589
- // The time of the switch:
590
- struct timespec switch_time;
591
- Fiber_Profiler_Time_current(&switch_time);
592
-
593
589
  if (capture->capture) {
590
+ // The time of the switch (end):
591
+ struct timespec switch_time;
592
+ Fiber_Profiler_Time_current(&switch_time);
593
+
594
594
  // The duration of the sample:
595
595
  double duration = Fiber_Profiler_Time_delta(&capture->switch_time, &switch_time);
596
596
 
@@ -611,8 +611,8 @@ void Fiber_Profiler_Capture_fiber_switch(VALUE self)
611
611
  }
612
612
 
613
613
  if (Fiber_Profiler_Capture_sample(capture)) {
614
- // Save the time of the switch for the next sample:
615
- capture->switch_time = switch_time;
614
+ // Capture the time of the switch (start):
615
+ Fiber_Profiler_Time_current(&capture->switch_time);
616
616
 
617
617
  // Start capturing data again:
618
618
  Fiber_Profiler_Capture_resume(self);
data/ext/fiber.o ADDED
Binary file
data/ext/mkmf.log ADDED
@@ -0,0 +1,69 @@
1
+ have_func: checking for rb_fiber_current()... -------------------- yes
2
+
3
+ DYLD_LIBRARY_PATH=.:/Users/samuel/.rubies/ruby-3.4.2/lib ASAN_OPTIONS=detect_leaks=0 "clang -o conftest -I/Users/samuel/.rubies/ruby-3.4.2/include/ruby-3.4.0/arm64-darwin24 -I/Users/samuel/.rubies/ruby-3.4.2/include/ruby-3.4.0/ruby/backward -I/Users/samuel/.rubies/ruby-3.4.2/include/ruby-3.4.0 -I. -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wextra-tokens -Wdeprecated-declarations -Wdivision-by-zero -Wdiv-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wmisleading-indentation -Wundef -pipe -Wall -Wno-unknown-pragmas -std=c99 conftest.c -L. -L/Users/samuel/.rubies/ruby-3.4.2/lib -L/opt/local/lib -L. -fstack-protector-strong -L/opt/local/lib -arch arm64 -lruby.3.4-static -framework CoreFoundation -lgmp -ldl -lobjc -lpthread -lpthread "
4
+ ld: warning: ignoring duplicate libraries: '-lpthread'
5
+ checked program was:
6
+ /* begin */
7
+ 1: #include "ruby.h"
8
+ 2:
9
+ 3: int main(int argc, char **argv)
10
+ 4: {
11
+ 5: return !!argv[argc];
12
+ 6: }
13
+ /* end */
14
+
15
+ DYLD_LIBRARY_PATH=.:/Users/samuel/.rubies/ruby-3.4.2/lib ASAN_OPTIONS=detect_leaks=0 "clang -o conftest -I/Users/samuel/.rubies/ruby-3.4.2/include/ruby-3.4.0/arm64-darwin24 -I/Users/samuel/.rubies/ruby-3.4.2/include/ruby-3.4.0/ruby/backward -I/Users/samuel/.rubies/ruby-3.4.2/include/ruby-3.4.0 -I. -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wextra-tokens -Wdeprecated-declarations -Wdivision-by-zero -Wdiv-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wmisleading-indentation -Wundef -pipe -Wall -Wno-unknown-pragmas -std=c99 conftest.c -L. -L/Users/samuel/.rubies/ruby-3.4.2/lib -L/opt/local/lib -L. -fstack-protector-strong -L/opt/local/lib -arch arm64 -lruby.3.4-static -framework CoreFoundation -lgmp -ldl -lobjc -lpthread -lpthread "
16
+ ld: warning: ignoring duplicate libraries: '-lpthread'
17
+ checked program was:
18
+ /* begin */
19
+ 1: #include "ruby.h"
20
+ 2:
21
+ 3: /*top*/
22
+ 4: extern int t(void);
23
+ 5: int main(int argc, char **argv)
24
+ 6: {
25
+ 7: if (argc > 1000000) {
26
+ 8: int (* volatile tp)(void)=(int (*)(void))&t;
27
+ 9: printf("%d", (*tp)());
28
+ 10: }
29
+ 11:
30
+ 12: return !!argv[argc];
31
+ 13: }
32
+ 14: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_fiber_current; return !p; }
33
+ /* end */
34
+
35
+ --------------------
36
+
37
+ have_func: checking for rb_ext_ractor_safe()... -------------------- yes
38
+
39
+ DYLD_LIBRARY_PATH=.:/Users/samuel/.rubies/ruby-3.4.2/lib ASAN_OPTIONS=detect_leaks=0 "clang -o conftest -I/Users/samuel/.rubies/ruby-3.4.2/include/ruby-3.4.0/arm64-darwin24 -I/Users/samuel/.rubies/ruby-3.4.2/include/ruby-3.4.0/ruby/backward -I/Users/samuel/.rubies/ruby-3.4.2/include/ruby-3.4.0 -I. -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wextra-tokens -Wdeprecated-declarations -Wdivision-by-zero -Wdiv-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wmisleading-indentation -Wundef -pipe -Wall -Wno-unknown-pragmas -std=c99 conftest.c -L. -L/Users/samuel/.rubies/ruby-3.4.2/lib -L/opt/local/lib -L. -fstack-protector-strong -L/opt/local/lib -arch arm64 -lruby.3.4-static -framework CoreFoundation -lgmp -ldl -lobjc -lpthread -lpthread "
40
+ ld: warning: ignoring duplicate libraries: '-lpthread'
41
+ checked program was:
42
+ /* begin */
43
+ 1: #include "ruby.h"
44
+ 2:
45
+ 3: /*top*/
46
+ 4: extern int t(void);
47
+ 5: int main(int argc, char **argv)
48
+ 6: {
49
+ 7: if (argc > 1000000) {
50
+ 8: int (* volatile tp)(void)=(int (*)(void))&t;
51
+ 9: printf("%d", (*tp)());
52
+ 10: }
53
+ 11:
54
+ 12: return !!argv[argc];
55
+ 13: }
56
+ 14: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_ext_ractor_safe; return !p; }
57
+ /* end */
58
+
59
+ --------------------
60
+
61
+ extconf.h is:
62
+ /* begin */
63
+ 1: #ifndef EXTCONF_H
64
+ 2: #define EXTCONF_H
65
+ 3: #define HAVE_RB_FIBER_CURRENT 1
66
+ 4: #define HAVE_RB_EXT_RACTOR_SAFE 1
67
+ 5: #endif
68
+ /* end */
69
+
data/ext/profiler.o ADDED
Binary file
data/ext/time.o ADDED
Binary file
@@ -7,6 +7,6 @@
7
7
  class Fiber
8
8
  # @namespace
9
9
  module Profiler
10
- VERSION = "0.3.0"
10
+ VERSION = "0.4.0"
11
11
  end
12
12
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,11 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fiber-profiler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain:
11
10
  - |
@@ -37,16 +36,22 @@ cert_chain:
37
36
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
38
37
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
39
38
  -----END CERTIFICATE-----
40
- date: 2025-02-15 00:00:00.000000000 Z
39
+ date: 1980-01-02 00:00:00.000000000 Z
41
40
  dependencies: []
42
- description:
43
- email:
44
41
  executables: []
45
42
  extensions:
46
43
  - ext/extconf.rb
47
44
  extra_rdoc_files: []
48
45
  files:
46
+ - ext/Fiber_Profiler.bundle
47
+ - ext/Fiber_Profiler.bundle.dSYM/Contents/Info.plist
48
+ - ext/Fiber_Profiler.bundle.dSYM/Contents/Resources/DWARF/Fiber_Profiler.bundle
49
+ - ext/Fiber_Profiler.bundle.dSYM/Contents/Resources/Relocations/aarch64/Fiber_Profiler.bundle.yml
50
+ - ext/Makefile
51
+ - ext/capture.o
52
+ - ext/extconf.h
49
53
  - ext/extconf.rb
54
+ - ext/fiber.o
50
55
  - ext/fiber/profiler/capture.c
51
56
  - ext/fiber/profiler/capture.h
52
57
  - ext/fiber/profiler/deque.h
@@ -56,6 +61,9 @@ files:
56
61
  - ext/fiber/profiler/profiler.h
57
62
  - ext/fiber/profiler/time.c
58
63
  - ext/fiber/profiler/time.h
64
+ - ext/mkmf.log
65
+ - ext/profiler.o
66
+ - ext/time.o
59
67
  - lib/fiber/profiler.rb
60
68
  - lib/fiber/profiler/capture.rb
61
69
  - lib/fiber/profiler/native.rb
@@ -69,7 +77,6 @@ licenses:
69
77
  metadata:
70
78
  documentation_uri: https://socketry.github.io/fiber-profiler/
71
79
  source_code_uri: https://github.com/socketry/fiber-profiler.git
72
- post_install_message:
73
80
  rdoc_options: []
74
81
  require_paths:
75
82
  - lib
@@ -77,15 +84,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
77
84
  requirements:
78
85
  - - ">="
79
86
  - !ruby/object:Gem::Version
80
- version: '3.1'
87
+ version: '3.2'
81
88
  required_rubygems_version: !ruby/object:Gem::Requirement
82
89
  requirements:
83
90
  - - ">="
84
91
  - !ruby/object:Gem::Version
85
92
  version: '0'
86
93
  requirements: []
87
- rubygems_version: 3.5.16
88
- signing_key:
94
+ rubygems_version: 3.6.7
89
95
  specification_version: 4
90
96
  summary: A fiber stall profiler.
91
97
  test_files: []
metadata.gz.sig CHANGED
Binary file