Date | Commit message (Collapse) |
|
That's where interesting developments happen, first.
|
|
libdl is no longer needed since we no longer use dlsym(3).
libc is assumed, not sure what I was smoking when I added
an explicit check for that...
|
|
* perl/master:
use perror(3) instead of fprintf(3)
script/*: shorten and point to docs
move _GNU_SOURCE definition
mwrap-perl: update manpage to synopsis to favor CSV
fix uninitialized warnings
rewrite README and update manpage to favor CSV
%p => PID expansion for dump_path + dump_csv
add mwrap-decode-csv tool
support MWRAP=dump_csv:$FILENAME parameter
simplify mw_perl_src_file_cstr to avoid gcc warning
t/httpd.t: needs sqlite3 3.32.0+ for `.import --csv'
s/X-Mwrap-BT-Depth/X-Mwrap-BT/
documentation updates
|
|
.dump_csv was added to dump_args for the destructor, but not
initialized properly for the Mwrap.dump API call.
|
|
I somehow forgot about the existence of the perror(3) function :x
|
|
perror(3) is standardized and reduces our binary text size a bit:
text data bss dec hex filename
80330 1888 4352 86570 1522a before/Mwrap.so
80043 1896 4352 86291 15113 after/Mwrap.so
|
|
Try to keep these scripts as short as possible so it's easier to
find the manpage. For -rproxy, I guess a small note at the top
will have to do...
|
|
This is to make the Ruby version happy.
|
|
|
|
The `dump_fd' warning is legit but wasn't caught on my other system.
The `lineno' warning pops up on my system with `-O0'
|
|
The CSV format has far more info, is self-describing, and
Devel::Mwrap->dump never existed. I'm not sure if I care to
support a Perl API now that the AF_UNIX HTTP interface exists.
|
|
This makes it possible to dump per-PID files for processes which
fork. `%p' matches what the Linux sys.kernel.core_pattern
sysctl understands.
|
|
This is a useful companion to the dump_csv: directive.
It also fixes a bug where HTML escaping was unnecessarily done
to the CSV output by -rproxy.
|
|
Just reusing code from httpd.
|
|
This works around a gcc (Debian 10.2.1-6) warning,
and is less code, even
|
|
Mostly a few portability bits, but a few httpd UI/UX
tweaks as well.
|
|
Just disable the test if CSV import doesn't work with the
currently-installed sqlite3.
|
|
This is more consistent with the `MWRAP=bt:' use, since adding
`-Depth' seems unnecessary and makes curl commands too long.
|
|
Document the HTTP POST API and update the README with POP3
info and some minor rewording. We'll also consistently use
`DIR' instead of `DIRECTORY' since it's shorter and well
understood (`opendir', `readdir', etc.)
|
|
|
|
`p' will deadlock even with `STDOUT.sync=true', apparently :<
|
|
This makes the .CSV download discoverable so I don't have
to document it in the manpage \o/
|
|
We don't users being confused if an innocuous-looking
line of code allocates unnexpectedly large values.
|
|
CSV output is intended to be loaded by something else
(e.g. SQLite, spreadsheet program, etc), so sorting it
is likely a waste of time.
|
|
FreeBSD 12.x doesn't seem to work with the `pkg install'-ed
ruby
|
|
This is more consistent with the `MWRAP=bt:' use, since adding
`-Depth' seems unnecessary and makes curl commands too long.
|
|
They're different projects, still, I guess...
|
|
We can't call rb_gc_count() safely outside of Ruby threads
(especially during startup/teardown), but we can share it's
last-known value safely.
|
|
This tests commit
649a0d3e3578 (httpd: undefine ruby_snprintf alias for non-Ruby processes, 2023-01-08)
|
|
By including them at the bottom. This will be done for Perl
headers in the future, too, since they break assert().
|
|
|
|
A weak symbol works fine, here.
|
|
Not sure what drugs I was on when I wrote this :x
|
|
ruby/subst.h (included by ruby.h) replaces `snprintf' with
`ruby_snprintf'. This only works in processes linked to Ruby,
but won't work in subprocesses spawned by Ruby.
|
|
|
|
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.
|
|
This fixes a `-Wundef' warning with gcc, and `__SSE_4_2__' is a
defined-ness check everywhere else.
|
|
Although we never vivify the O_TMPFILE to an non-FS path (via
linkat(2)), glibc may still complain about it since it doesn't
know we never call linkat(2)
|
|
This quiets `undefining the allocator of T_DATA class Mwrap::SourceLocation'
warnings.
|
|
Rack 3 requires lowercase headers, and they work with any
Rack <=2.x version.
|
|
Ruby 3.1 uses mmap, nowadays, and I don't think it's worth the
effort to suport it since mmap and munmap don't require the
symmetry *memalign + free do.
|
|
The `_' stat cache is cleared if `-x' fails, so ensure we
capture it cheaply from the preceding `-e' before attempting
`-x "/usr/bin/debugperl"'.
|
|
Unlike pwrite(2), it won't dirty the last page, and it's fewer
arguments so argument passing is simpler.
|
|
GNU addr2line seems impossibly slow with MWRAP=bt:10 on FreeBSD.
In any case, it's impossible for a single-process rproxy to
inspect it's own addr2line processes; so just disable it.
|
|
No point in showing "?? at ??:0" to prefix everything.
|
|
We'll hoist out exe resolution into its own sub and rely on
reusing stat info (via `stat(_)') to give us ctime + size info
to use as a cache key.
|
|
We'll open scripts to resolve shebang lines (necessary for Perl
scripts), and resolve non-absolute paths from to absolute paths
based on $PATH (based on git).
There's also a perl-debug||/usr/bin/debugperl special case for
Debian, since there's (AFAIK) no -dbgsym package on Debian
bullseye which covers /usr/bin/perl.
|
|
And always close our write end first so we can shut down
addr2line slightly sooner.
|
|
I'm not sure if it's really an issue, but it it narrows down
the places where uninitialized variable warnings can happen.
|
|
Given the fragile change in
https://80x24.org/mwrap-perl/20221227141712.1473379-1-e@80x24.org/
to support addr2line(1), I am considering integrating the GPL-3
code for GNU addr2line into httpd.h directly.
|