stack_frames 0.1.1 → 0.1.3
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 +4 -4
- data/.github/workflows/ci.yml +12 -0
- data/.github/workflows/cla.yml +22 -0
- data/Rakefile +8 -1
- data/ext/stack_frames/buffer.c +1 -1
- data/ext/stack_frames/extconf.rb +1 -1
- data/ext/stack_frames/frame.c +2 -6
- data/ext/stack_frames/stack_frames.c +1 -1
- data/lib/stack_frames/version.rb +1 -1
- data/stack_frames.gemspec +1 -0
- metadata +18 -4
- data/.github/probots.yml +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2238db3a0eba08ae5a8faa43f18e315b5f8be27d5758429d6c168aa2017375fc
|
4
|
+
data.tar.gz: 70ef59c3d901559ffd7137a7720b5d921b511c8a68162de29b8ff8c3fba1b8bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea5b8152852b6afade78b89c96b875d3d0585055c549ff07eb8e9d9eefe1614e71e4e69098793766397a8471a24dbd53a0c37298c02ea3fa5822b187c826c8ad
|
7
|
+
data.tar.gz: c29732481c3a7f4d198cdd26265f2b680b300d74e419f3a6c319b98420dffaf62b9750fc39c2e68ea31ef6a9d0358238ec650eb6df801082f6ffacbb4c949293
|
data/.github/workflows/ci.yml
CHANGED
@@ -14,6 +14,7 @@ jobs:
|
|
14
14
|
'2.7',
|
15
15
|
'3.0',
|
16
16
|
'3.1',
|
17
|
+
'3.2',
|
17
18
|
]
|
18
19
|
steps:
|
19
20
|
- uses: actions/checkout@v2
|
@@ -22,3 +23,14 @@ jobs:
|
|
22
23
|
ruby-version: ${{ matrix.ruby }}
|
23
24
|
bundler-cache: true
|
24
25
|
- run: bundle exec rake
|
26
|
+
|
27
|
+
valgrind:
|
28
|
+
runs-on: ubuntu-latest
|
29
|
+
steps:
|
30
|
+
- uses: actions/checkout@v2
|
31
|
+
- uses: ruby/setup-ruby@v1
|
32
|
+
with:
|
33
|
+
ruby-version: '3.1'
|
34
|
+
bundler-cache: true
|
35
|
+
- run: sudo apt-get install -y valgrind
|
36
|
+
- run: bundle exec rake test:valgrind
|
@@ -0,0 +1,22 @@
|
|
1
|
+
name: Contributor License Agreement (CLA)
|
2
|
+
|
3
|
+
on:
|
4
|
+
pull_request_target:
|
5
|
+
types: [opened, synchronize]
|
6
|
+
issue_comment:
|
7
|
+
types: [created]
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
cla:
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
if: |
|
13
|
+
(github.event.issue.pull_request
|
14
|
+
&& !github.event.issue.pull_request.merged_at
|
15
|
+
&& contains(github.event.comment.body, 'signed')
|
16
|
+
)
|
17
|
+
|| (github.event.pull_request && !github.event.pull_request.merged)
|
18
|
+
steps:
|
19
|
+
- uses: Shopify/shopify-cla-action@v1
|
20
|
+
with:
|
21
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
22
|
+
cla-token: ${{ secrets.CLA_TOKEN }}
|
data/Rakefile
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
2
|
require "rake/testtask"
|
3
3
|
require 'rake/extensiontask'
|
4
|
+
require "ruby_memcheck"
|
5
|
+
|
6
|
+
RubyMemcheck.config(binary_name: "stack_frames")
|
4
7
|
|
5
8
|
ENV['STACK_FRAMES_DEV'] = '1'
|
6
9
|
|
@@ -8,10 +11,14 @@ Rake::ExtensionTask.new("stack_frames") do |ext|
|
|
8
11
|
ext.lib_dir = 'lib/stack_frames'
|
9
12
|
end
|
10
13
|
|
11
|
-
|
14
|
+
test_config = lambda do |t|
|
12
15
|
t.libs << "test"
|
13
16
|
t.libs << "lib"
|
14
17
|
t.test_files = FileList["test/**/*_test.rb"]
|
15
18
|
end
|
19
|
+
Rake::TestTask.new(test: :compile, &test_config)
|
20
|
+
namespace :test do
|
21
|
+
RubyMemcheck::TestTask.new(valgrind: :compile, &test_config)
|
22
|
+
end
|
16
23
|
|
17
24
|
task :default => :test
|
data/ext/stack_frames/buffer.c
CHANGED
@@ -33,7 +33,7 @@ static size_t buffer_memsize(const void *ptr)
|
|
33
33
|
return sizeof(buffer_t);
|
34
34
|
}
|
35
35
|
|
36
|
-
const rb_data_type_t buffer_data_type = {
|
36
|
+
static const rb_data_type_t buffer_data_type = {
|
37
37
|
"stack_frames_buffer",
|
38
38
|
{ buffer_mark, buffer_free, buffer_memsize, },
|
39
39
|
NULL, NULL, RUBY_TYPED_FREE_IMMEDIATELY
|
data/ext/stack_frames/extconf.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
require 'mkmf'
|
2
|
-
$CFLAGS << ' -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers'
|
2
|
+
$CFLAGS << ' -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden'
|
3
3
|
$CFLAGS << ' -Werror' if ENV['STACK_FRAMES_DEV']
|
4
4
|
create_makefile("stack_frames/stack_frames")
|
data/ext/stack_frames/frame.c
CHANGED
@@ -14,18 +14,14 @@ static void frame_mark(void *ptr)
|
|
14
14
|
rb_gc_mark(frame->buffer);
|
15
15
|
}
|
16
16
|
|
17
|
-
static void frame_free(void *ptr)
|
18
|
-
{
|
19
|
-
}
|
20
|
-
|
21
17
|
static size_t frame_memsize(const void *ptr)
|
22
18
|
{
|
23
19
|
return sizeof(frame_t);
|
24
20
|
}
|
25
21
|
|
26
|
-
const rb_data_type_t frame_data_type = {
|
22
|
+
static const rb_data_type_t frame_data_type = {
|
27
23
|
"stack_frames_frame",
|
28
|
-
{ frame_mark,
|
24
|
+
{ frame_mark, RUBY_DEFAULT_FREE, frame_memsize, },
|
29
25
|
NULL, NULL, RUBY_TYPED_FREE_IMMEDIATELY
|
30
26
|
};
|
31
27
|
|
data/lib/stack_frames/version.rb
CHANGED
data/stack_frames.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stack_frames
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dylan Thacker-Smith
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 0.2.13
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: ruby_memcheck
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
83
97
|
description:
|
84
98
|
email:
|
85
99
|
- gems@shopify.com
|
@@ -88,8 +102,8 @@ extensions:
|
|
88
102
|
- ext/stack_frames/extconf.rb
|
89
103
|
extra_rdoc_files: []
|
90
104
|
files:
|
91
|
-
- ".github/probots.yml"
|
92
105
|
- ".github/workflows/ci.yml"
|
106
|
+
- ".github/workflows/cla.yml"
|
93
107
|
- ".gitignore"
|
94
108
|
- CODE_OF_CONDUCT.md
|
95
109
|
- CONTRIBUTING.md
|
@@ -131,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
131
145
|
- !ruby/object:Gem::Version
|
132
146
|
version: '0'
|
133
147
|
requirements: []
|
134
|
-
rubygems_version: 3.
|
148
|
+
rubygems_version: 3.3.3
|
135
149
|
signing_key:
|
136
150
|
specification_version: 4
|
137
151
|
summary: Zero allocation backtraces using MRI's profile frames API
|
data/.github/probots.yml
DELETED