ruby-prof 1.4.0 → 1.4.1

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: 756de796c2629622138d38034f1c895b2d2e32e8e00f1ef3d7b9bad2210b4cc2
4
- data.tar.gz: 686d22e4138b8fbe4a03f9ba8bfcd1e5523671fb5b4a3f46029676339a2736b8
3
+ metadata.gz: 46257897a9eb100edbd33483a4d9b025754eae985f6c4fd49a4b986f7dbac895
4
+ data.tar.gz: 043ba8f3fcfec4322f4dde5b2489b4b44ee3fa12e383ba2b89853a47c489772d
5
5
  SHA512:
6
- metadata.gz: 0fdfc46eb05543b5e6fa0ea1e669c390561074f2c9a0a3e5e2d109ee5cf713ad1bd663dd842bf2f8dc973c88f95838cd94b564e9e5e517fcc81daf8325751396
7
- data.tar.gz: '058817625f1294f32d1aaba1dcc5f607d9375ec85177f69461be92a9fda972765f211e2d385514360779d6a034f15b4966de082c22d8017a3889c2a856aadd3b'
6
+ metadata.gz: c48297977b2cae9ec15a8a8a98f4a3b3ea58006bce7de933d55bea935be10fc03b7d99a93551acfe223d3aa0ad1dad72c53943cfc5a76b5f0f214a555c03518e
7
+ data.tar.gz: 2fbcfa48dafa4f8d8ee0f53bd474656e360a9255051a60e3afb820aa8389102dbbd38fda2f078858c724fc624a23f21913174425ac807d3991165c382a619f9a
data/CHANGES CHANGED
@@ -1,3 +1,7 @@
1
+ 1.4.1 (2020-05-14)
2
+ =====================
3
+ * Fix compiling on older versions of gcc that do not default to c99 (Charlie Savage)
4
+
1
5
  1.4.0 (2020-05-12)
2
6
  =====================
3
7
  * API change - remove merge_fibers support since it resulted in incorrect results or crashes (Charlie Savage)
@@ -3,4 +3,10 @@ require "mkmf"
3
3
  # This function was added in Ruby 2.5, so once Ruby 2.4 is no longer supported this can be removed
4
4
  have_func('rb_tracearg_callee_id', ["ruby.h"])
5
5
 
6
+ # We want to intermix declarations and code (ie, don't define all variables at the top of the method)
7
+ $CFLAGS += ' -std=c99'
8
+
9
+ # And since we are using C99 we want to disable Ruby sending these warnings to gcc
10
+ CONFIG['warnflags'].gsub!('-Wdeclaration-after-statement', '')
11
+
6
12
  create_makefile("ruby_prof")
@@ -1,3 +1,3 @@
1
1
  module RubyProf
2
- VERSION = "1.4.0"
2
+ VERSION = "1.4.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-prof
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shugo Maeda, Charlie Savage, Roger Pack, Stefan Kaes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-12 00:00:00.000000000 Z
11
+ date: 2020-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
@@ -100,7 +100,6 @@ files:
100
100
  - ext/ruby_prof/ruby_prof.h
101
101
  - ext/ruby_prof/vc/ruby_prof.sln
102
102
  - ext/ruby_prof/vc/ruby_prof.vcxproj
103
- - ext/ruby_prof/vc/ruby_prof_linux.vcxproj
104
103
  - lib/ruby-prof.rb
105
104
  - lib/ruby-prof/assets/call_stack_printer.html.erb
106
105
  - lib/ruby-prof/assets/call_stack_printer.png
@@ -132,7 +131,6 @@ files:
132
131
  - test/basic_test.rb
133
132
  - test/call_tree_visitor_test.rb
134
133
  - test/call_trees_test.rb
135
- - test/client.rb
136
134
  - test/duplicate_names_test.rb
137
135
  - test/dynamic_method_test.rb
138
136
  - test/enumerable_test.rb
@@ -165,7 +163,6 @@ files:
165
163
  - test/printing_recursive_graph_test.rb
166
164
  - test/rack_test.rb
167
165
  - test/recursive_test.rb
168
- - test/server.rb
169
166
  - test/singleton_test.rb
170
167
  - test/stack_printer_test.rb
171
168
  - test/start_stop_test.rb
@@ -180,7 +177,7 @@ metadata:
180
177
  bug_tracker_uri: https://github.com/ruby-prof/ruby-prof/issues
181
178
  changelog_uri: https://github.com/ruby-prof/ruby-prof/blob/master/CHANGES
182
179
  documentation_uri: https://ruby-prof.github.io/
183
- source_code_uri: https://github.com/ruby-prof/ruby-prof/tree/v1.4.0
180
+ source_code_uri: https://github.com/ruby-prof/ruby-prof/tree/v1.4.1
184
181
  post_install_message:
185
182
  rdoc_options: []
186
183
  require_paths:
@@ -1,132 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
- <ItemGroup Label="ProjectConfigurations">
4
- <ProjectConfiguration Include="Debug|ARM">
5
- <Configuration>Debug</Configuration>
6
- <Platform>ARM</Platform>
7
- </ProjectConfiguration>
8
- <ProjectConfiguration Include="Release|ARM">
9
- <Configuration>Release</Configuration>
10
- <Platform>ARM</Platform>
11
- </ProjectConfiguration>
12
- <ProjectConfiguration Include="Debug|ARM64">
13
- <Configuration>Debug</Configuration>
14
- <Platform>ARM64</Platform>
15
- </ProjectConfiguration>
16
- <ProjectConfiguration Include="Release|ARM64">
17
- <Configuration>Release</Configuration>
18
- <Platform>ARM64</Platform>
19
- </ProjectConfiguration>
20
- <ProjectConfiguration Include="Debug|x86">
21
- <Configuration>Debug</Configuration>
22
- <Platform>x86</Platform>
23
- </ProjectConfiguration>
24
- <ProjectConfiguration Include="Release|x86">
25
- <Configuration>Release</Configuration>
26
- <Platform>x86</Platform>
27
- </ProjectConfiguration>
28
- <ProjectConfiguration Include="Debug|x64">
29
- <Configuration>Debug</Configuration>
30
- <Platform>x64</Platform>
31
- </ProjectConfiguration>
32
- <ProjectConfiguration Include="Release|x64">
33
- <Configuration>Release</Configuration>
34
- <Platform>x64</Platform>
35
- </ProjectConfiguration>
36
- </ItemGroup>
37
- <PropertyGroup Label="Globals">
38
- <ProjectGuid>{fd79d690-c808-464c-a46b-01188609976e}</ProjectGuid>
39
- <Keyword>Linux</Keyword>
40
- <RootNamespace>Project1</RootNamespace>
41
- <MinimumVisualStudioVersion>15.0</MinimumVisualStudioVersion>
42
- <ApplicationType>Linux</ApplicationType>
43
- <ApplicationTypeRevision>1.0</ApplicationTypeRevision>
44
- <TargetLinuxPlatform>Generic</TargetLinuxPlatform>
45
- <LinuxProjectType>{2238F9CD-F817-4ECC-BD14-2524D2669B35}</LinuxProjectType>
46
- </PropertyGroup>
47
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
48
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
49
- <UseDebugLibraries>true</UseDebugLibraries>
50
- </PropertyGroup>
51
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
52
- <UseDebugLibraries>false</UseDebugLibraries>
53
- </PropertyGroup>
54
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'" Label="Configuration">
55
- <UseDebugLibraries>true</UseDebugLibraries>
56
- </PropertyGroup>
57
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x86'" Label="Configuration">
58
- <UseDebugLibraries>false</UseDebugLibraries>
59
- </PropertyGroup>
60
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
61
- <UseDebugLibraries>true</UseDebugLibraries>
62
- <PlatformToolset>WSL_1_0</PlatformToolset>
63
- <ConfigurationType>DynamicLibrary</ConfigurationType>
64
- </PropertyGroup>
65
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
66
- <UseDebugLibraries>false</UseDebugLibraries>
67
- <PlatformToolset>WSL_1_0</PlatformToolset>
68
- <ConfigurationType>DynamicLibrary</ConfigurationType>
69
- </PropertyGroup>
70
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
71
- <UseDebugLibraries>false</UseDebugLibraries>
72
- </PropertyGroup>
73
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
74
- <UseDebugLibraries>true</UseDebugLibraries>
75
- </PropertyGroup>
76
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
77
- <ImportGroup Label="ExtensionSettings" />
78
- <ImportGroup Label="Shared" />
79
- <ImportGroup Label="PropertySheets" />
80
- <PropertyGroup Label="UserMacros" />
81
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
82
- <TargetName>ruby_prof</TargetName>
83
- <OutDir>../usr/local/lib64/gems/ruby/ruby-prof-1.3.2/</OutDir>
84
- </PropertyGroup>
85
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
86
- <TargetName>ruby_prof</TargetName>
87
- </PropertyGroup>
88
- <ItemGroup>
89
- <ClInclude Include="..\rp_aggregate_call_tree.h" />
90
- <ClInclude Include="..\rp_allocation.h" />
91
- <ClInclude Include="..\rp_call_tree.h" />
92
- <ClInclude Include="..\rp_call_trees.h" />
93
- <ClInclude Include="..\rp_measurement.h" />
94
- <ClInclude Include="..\rp_method.h" />
95
- <ClInclude Include="..\rp_profile.h" />
96
- <ClInclude Include="..\rp_stack.h" />
97
- <ClInclude Include="..\rp_thread.h" />
98
- <ClInclude Include="..\ruby_prof.h" />
99
- </ItemGroup>
100
- <ItemGroup>
101
- <ClCompile Include="..\rp_aggregate_call_tree.c" />
102
- <ClCompile Include="..\rp_allocation.c" />
103
- <ClCompile Include="..\rp_call_tree.c" />
104
- <ClCompile Include="..\rp_call_trees.c" />
105
- <ClCompile Include="..\rp_measurement.c" />
106
- <ClCompile Include="..\rp_measure_allocations.c" />
107
- <ClCompile Include="..\rp_measure_memory.c" />
108
- <ClCompile Include="..\rp_measure_process_time.c" />
109
- <ClCompile Include="..\rp_measure_wall_time.c" />
110
- <ClCompile Include="..\rp_method.c" />
111
- <ClCompile Include="..\rp_profile.c" />
112
- <ClCompile Include="..\rp_stack.c" />
113
- <ClCompile Include="..\rp_thread.c" />
114
- <ClCompile Include="..\ruby_prof.c" />
115
- </ItemGroup>
116
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
117
- <Link>
118
- <LibraryDependencies>ruby</LibraryDependencies>
119
- </Link>
120
- <ClCompile>
121
- <PreprocessorDefinitions>
122
- </PreprocessorDefinitions>
123
- </ClCompile>
124
- </ItemDefinitionGroup>
125
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
126
- <Link>
127
- <LibraryDependencies>ruby</LibraryDependencies>
128
- </Link>
129
- </ItemDefinitionGroup>
130
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
131
- <ImportGroup Label="ExtensionTargets" />
132
- </Project>
@@ -1,9 +0,0 @@
1
- # tcp_client.rb
2
- require 'socket'
3
- client = TCPSocket.new('localhost', 9090)
4
-
5
- client.puts("HI")
6
- line = client.gets
7
- puts line
8
-
9
- client.close
@@ -1,64 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'socket'
4
- require 'fiber'
5
-
6
- # The full implementation is given here, in order to show all the parts. A simpler implementation is given below.
7
- class Reactor
8
- def initialize
9
- @readable = {}
10
- @writable = {}
11
- end
12
-
13
- def run
14
- while @readable.any? or @writable.any?
15
- readable, writable = IO.select(@readable.keys, @writable.keys, [])
16
-
17
- readable.each do |io|
18
- @readable[io].resume
19
- end
20
-
21
- writable.each do |io|
22
- @writable[io].resume
23
- end
24
- end
25
- end
26
-
27
- def wait_readable(io)
28
- @readable[io] = Fiber.current
29
- Fiber.yield
30
- @readable.delete(io)
31
-
32
- return yield if block_given?
33
- end
34
-
35
- def wait_writable(io)
36
- @writable[io] = Fiber.current
37
- Fiber.yield
38
- @writable.delete(io)
39
-
40
- return yield if block_given?
41
- end
42
- end
43
-
44
- server = TCPServer.new('localhost', 9090)
45
- reactor = Reactor.new
46
-
47
- Fiber.new do
48
- loop do
49
- client = reactor.wait_readable(server) do
50
- server.accept
51
- end
52
-
53
- Fiber.new do
54
- while buffer = reactor.wait_readable(client) {client.gets}
55
- reactor.wait_writable(client)
56
- client.puts(buffer)
57
- end
58
-
59
- client.close
60
- end.resume
61
- end
62
- end.resume
63
-
64
- reactor.run