diff options
author | Eric Wong <e@80x24.org> | 2023-01-08 05:03:26 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2023-01-08 05:05:01 +0000 |
commit | b5ab9be6686aa778a4cfd7622c598736b9c42321 (patch) | |
tree | a967297606a1f91f8359e287d5a85ad018e185e3 /mwrap.gemspec | |
parent | 4356beb8237a92b3902b17f55cfe93d347b593d5 (diff) | |
parent | 2c25edb01139365f4754985c1e3494765dd1e5a7 (diff) | |
download | mwrap-b5ab9be6686aa778a4cfd7622c598736b9c42321.tar.gz |
This contains many changes from https://80x24.org/mwrap-perl.git commit * Built-in RCU-friendly version of dlmalloc, no more fragile dlsym(3m) resolution of malloc-family functions in the constructor * Allocations are now backed by O_TMPFILE on $TMPDIR on modern Linux. Since mwrap increases memory usage greatly and I needed to use it on a system where I needed more VM space but lacked the ability to add swap. * Configurable C backtrace level via MWRAP=bt:$DEPTH where $DEPTH is a non-negative integer. Be careful about increasing it, even a depth of 3-4 can be orders-of-magnitude more expensive in time and space. This can be changed dynamically at runtime via local HTTP (see below). * Embedded per-process local-socket-only HTTP server obsoletes MwrapRack when combined with mwrap-rproxy from the Perl dist (set `MWRAP=socket_dir:/dir/of/sockets') See https://80x24.org/mwrap-perl/20221210015518.272576-4-e@80x24.org/ for more info. It now supports downloading CSV (suitable for importing into sqlite 3.32.0+) * License switched to GPL-3+ to be compatible with GNU binutils since we may take code from addr2line in the future. * libxxhash supported if XXH3_64bits is available.
Diffstat (limited to 'mwrap.gemspec')
-rw-r--r-- | mwrap.gemspec | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/mwrap.gemspec b/mwrap.gemspec new file mode 100644 index 0000000..dc99924 --- /dev/null +++ b/mwrap.gemspec @@ -0,0 +1,35 @@ +git_manifest = `git ls-files 2>/dev/null`.split("\n") +git_ok = $?.success? +git_manifest << 'lib/mwrap/version.rb'.freeze # generated by ./VERSION-GEN +manifest = File.exist?('MANIFEST') ? + File.readlines('MANIFEST').map!(&:chomp).delete_if(&:empty?) : git_manifest +if git_ok && manifest != git_manifest + tmp = "MANIFEST.#$$.tmp" + File.open(tmp, 'w') { |fp| fp.puts(git_manifest.join("\n")) } + File.rename(tmp, 'MANIFEST') + system('git add MANIFEST') +end + +version = `./VERSION-GEN`.chomp +$?.success? or abort './VERSION-GEN failed' + +Gem::Specification.new do |s| + s.name = 'mwrap' + s.version = version + s.homepage = 'https://80x24.org/mwrap/' + s.authors = ["mwrap hackers"] + s.summary = 'LD_PRELOAD malloc wrapper for Ruby' + s.executables = %w(mwrap) + s.files = manifest + s.description = <<~EOF +mwrap wraps all malloc, calloc, and realloc calls to trace the Ruby +source location of such calls and bytes allocated at each callsite. + EOF + s.email = %q{e@80x24.org} + s.test_files = Dir['test/test_*.rb'] + s.extensions = %w(ext/mwrap/extconf.rb) + + s.add_development_dependency('test-unit', '~> 3.0') + s.add_development_dependency('rake-compiler', '~> 1.0') + s.licenses = %w(GPL-3.0+) +end |