| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
This is an #ifdef option since it's really of dubious utility.
|
| |
|
|
|
|
|
| |
These were helpful for debugging the latest issues, but are perhaps a
bit hacky. Placing them within an #ifdef for the time being.
|
|
|
|
| |
This significantly improves our results.
|
| |
|
|
|
|
| |
Some of the data was not being reset properly on a new sample.
|
| |
|
|
|
|
|
| |
Rarely, the unwinder can loop indefinitely.
Guard against this, similarly to the code in stack.c.
|
|
|
|
|
| |
There are several things to improve to get parity with eu-stack
in terms of CFI handling; this is the first fix.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Consistent with sysprof style (via sysprof-capture-types.h).
|
|
|
|
|
|
|
| |
Still a number of pieces missing:
- recycle Dwfl structs sensibly
- create and output callchain frame
- compare to baseline sysprof unwinding, improve data quality
|
| |
|
| |
|
|
|
|
|
|
| |
Adding these declarations as a fallback saves some fuss, since
eu-stacktrace can then be built with distro-provided sysprof-4
headers.
|
|
|
|
| |
(the separate skip_frame and peek_frame functions are not being used)
|
|
|
|
| |
Separate and byte-swap the packets as done by sysprof-capture-reader.
|
|
|
|
| |
Also fixed a number of incorrectly named PERF_EVENT_* constants.
|
|
|
|
|
|
|
| |
Updated example usage:
- mkfifo /tmp/test.fifo
- eu-stacktrace </tmp/test.fifo >test.syscap &
- sysprof-cli --use-fifo=/tmp/test.fifo test.syscap
|
|
|
|
|
|
|
| |
Updated example usage:
- mkfifo /tmp/test.fifo
- eu-stacktrace </tmp/test.fifo >output=test.syscap &
- sysprof-cli --use-fifo=/tmp/test.fifo test.syscap
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Works with the sysprof serhei/samples-via-fifo patchset [1].
Example usage:
- mkfifo /tmp/test.fifo
- eu-stacktrace --input=/tmp/test.fifo --output=test.syscap &
- sysprof-cli --use-fifo=/tmp/test.fifo test.syscap
[1]: https://git.sr.ht/~serhei/sysprof-experiments/log/serhei/samples-via-fifo
|
|
|
|
|
|
| |
This header defines the Sysprof data format; we could make it optional
through configury, but for now the prototype does not support any other
data format.
|
|
|
|
|
|
|
|
| |
eu-stacktrace is (will be) a utility to process a stream of stack
samples (such as those obtained from PERF_EVENT_SAMPLE) into a stream
of stack traces (such as those obtained from PERF_EVENT_CALLCHAIN),
freeing various profiling utilities from having to implement their own
backtracing logic.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this patch I can use eu-elflint to verify LoongArch ELF
binaries. Previously eu-elflint was complaining about invalid
machine flags:
$ ./src/elflint --gnu-ld ./src/elflint
invalid machine flags: 0x43
$ echo $?
1
* backends/loongarch_symbol.c (loongarch_init): Hook
machine_flag_check.
* backends/loongarch_symbol.c (loongarch_machine_flag_check):
New function.
https://sourceware.org/bugzilla/show_bug.cgi?id=30251
Signed-off-by: Alexey Sheplyakov <asheplyakov@basealt.ru>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Empty files in the client cache are used to indicate that contacted
servers could not find a requested resource. Future queries for this
resource will not be attempted until the cache_miss_s duration has
passed.
Currently these empty files are also created when a query is cancelled
through the client's progressfn. This can occur, for example, when a
user cancels a download with ctrl-c.
This prevents user-cancelled queries from being retried promptly without
having to modify cache_miss_s. Fix this by skipping the creation of an
empty cache file when progressfn cancels a query.
Signed-off-by: Aaron Merey <amerey@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some setups might have some frames for unknown (null) functions
in the thread backtrace. Skip these frames instead of failing
immediately.
* tests/backtrace.c (callback_verify): Check and skip nulls_seen.
https://sourceware.org/bugzilla/show_bug.cgi?id=29176
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Autoconf scripts are supposed to be written in POSIX-compatible shell
language. elfutils commits 0ffe2874e75d48cb88936e119e5284ff2bf664d9
and 3fa98a6f29b0f370e32549ead7eb897c839af980 introduced Bashisms to
configure.ac that cause errors when /bin/sh is not Bash.
Example error when /bin/sh is Dash:
./configure: 8748: test: xyes: unexpected operator
The cause of the error is the use of a non-existent == operator in
expressions passed to the 'test' built-in command. POSIX shell
specifies only an = operator for testing string equality.
* configure.ac: Replace == by = in use_msan and enable_demangler
comparisons.
https://sourceware.org/bugzilla/show_bug.cgi?id=30196
Reported-by: Matt Whitlock <sourceware@mattwhitlock.name>
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When doing a static build (as with --enable-gcov) the build fails
because the executables aren't linked with -lzstd. Also the
run-debuginfod-query-retry.sh test relies on libdebuginfod.so.1 which
isn't there.
Fix by adding $(zstd_LIBS) to the static libelf lines and using the
debuginfod-find executable itself in the testcase.
* src/Makefile.am (libelf): When BUILD_STATIC add $(zstd_LIBS)
* tests/Makefile.am (libelf): Likewise.
* tests/run-debuginfod-query-retry.sh: Use debuginfod-find instead
of libdebuginfod.so.1
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
|
|
| |
Set version to 0.189
Update NEWS and elfutils.spec.in
Set copyright year in configure.ac and printversion.
Regenerate po/*.po files.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
|
| |
Make sure that even if the system elf.h doesn't have ELF_COMPRESS_ZSTD
defined it can still be used as constant. Also update libelf.h
documentation and add new feature to NEWS.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With -flto gcc 13 sees that we use the ebl pointer after closing and
freeing it.
In function ‘process_elf_file’,
inlined from ‘process_dwflmod’ at readelf.c:818:3:
readelf.c:1070:6: error: pointer ‘ebl_18’ used after ‘free’ [-Werror=use-after-free]
1070 | if (pure_ebl != ebl)
| ^
In function ‘ebl_closebackend’,
inlined from ‘process_elf_file’ at readelf.c:1068:3,
inlined from ‘process_dwflmod’ at readelf.c:818:3:
../libebl/eblclosebackend.c:47:7: note: call to ‘free’ here
47 | free (ebl);
| ^
Fix by only calling ebl_closebackend after using it in the comparison.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
|
|
|
| |
When there is an error in dwarf_getscopes after the initial scopes
have been allocated, e.g. when looking for the inlined scopes, then
the scopes would leak. Fix this by explicitly free the scopes on error.
https://sourceware.org/bugzilla/show_bug.cgi?id=29434
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
| |
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
| |
.debug sections are raw bytes and don't need conversion even when host
and file have different endian order.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
|
| |
Otherwise some undefined bytes might be left in the buffer. Now they
might still be not useful, but at least they are as defined in the
file.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
| |
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
| |
Update m4/ax_check_compile_flag.m4 and m4/ax_cxx_compile_stdcxx.m4
to autoconf-archive-2023.02.20.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
| |
gcc already includes -Wuse-after-free=2 in -Wall. -Wuse-after-free=3
also warns for indeterminate pointers in equality expressions.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Pointed out by gcc 12 with -Wuse-after-free=3
In function ‘free_section’
asm_end.c:552:17: error: pointer ‘data’ used after ‘free’ [-Werror=use-after-free]
552 | while (oldp != scnp->content);
| ~~~~~^~~~~~~~~~~~~~~~
asm_end.c:550:9: note: call to ‘free’ here
550 | free (oldp);
| ^~~~~~~~~~~
Fix by freeing scnp->content last.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
| |
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is expected from libdw to return strings that are null-terminated to
avoid overflowing ELF data.
* Add calculation of a safe prefix inside string sections, where any
string will be null-terminated.
* Check if offset overflows the safe prefix in dwarf_formstring.
Signed-off-by: Aleksei Vetrov <vvvvvv@google.com>
|
|
|
|
|
|
|
|
|
| |
There have been a couple of cases where demangler support has been
accidentially been disabled because libstdc++ wasn't there/installed
during build. Make it an error if --disable-demangler isn't explicitly
given.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
| |
Fixes indentation of -g option.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
|
| |
In __libdw_intern_expression we checked for one byte too many.
We only need one byte for the size and (at least one) for the uleb128
DIE reference.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|