public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/6] BTF ABI
@ 2021-06-11 15:33 Giuliano Procida
  2021-06-11 15:33 ` [PATCH 1/6] Tweak clang-format Giuliano Procida
                   ` (6 more replies)
  0 siblings, 7 replies; 14+ messages in thread
From: Giuliano Procida @ 2021-06-11 15:33 UTC (permalink / raw)
  To: libabigail; +Cc: dodji, kernel-team, gprocida, maennich, teguiani

Hi.

This code was developed by Maria Teguiani who interned with Android
last summer and later by me.

BTF is the BPF type format.

See: https://www.kernel.org/doc/html/latest/bpf/btf.html

The Linux kernel can be compiled with BTF type information. Together
with the kernel and ELF symtabs, it can be used to as an alternative
basis for kernel ABI monitoring.

BTF has several limitations compared with libabigail ABI XML.
Foremost, it supports C types only. There are also some other
significant issues that may be resolved with time. The simplicity of
BTF makes it an ideal vehicle for experimentation.

An ELF object file containing DWARF debug information can be augmented
with BTF debug information using pahole -J. pahole is part of dwarves.

These patches contribute:

- a BTF parser / BTF graph builder
- code to dump BTF information as it is parsed
- a BTF graph difference algorithm to generate graphs of differences
- a C type name generator
- code to serialise a difference graph as a text report

The graph difference algorithm uses a strongly-connected component
finder based on the path-based SCC algorithm. My main contribution
here was the design which allows the BTF graph difference algorithm to
be written in a straightforward recursive style.

Missing from these patches are:

- Some documentation I wrote in markdown format.
- A suite of small tests, of which the C language ones have been used to
  validate the BTF utilities.

I hope this work will be useful to anyone wishing to experiment with
BTF as an ABI representation or who has an interest in graph diff
algorithms.

Feedback is very welcome.

Regards,
Giuliano.

Giuliano Procida (6):
  Tweak clang-format
  Allow C++17 code to be compiled
  BTF: add SCC finder and test
  BTF: add core functionality
  BTF: add btfinfo and btfdiff tools
  BTF: clang-format all the new source files

 .clang-format     |    9 +-
 COMPILING         |    5 +
 configure.ac      |   21 +-
 include/abg-btf.h |  888 ++++++++++++++++++++++++
 include/abg-scc.h |  122 ++++
 src/Makefile.am   |    9 +-
 src/abg-btf.cc    | 1649 +++++++++++++++++++++++++++++++++++++++++++++
 tests/Makefile.am |    7 +
 tests/test-scc.cc |  220 ++++++
 tools/Makefile.am |   14 +
 tools/btfdiff.cc  |   71 ++
 tools/btfinfo.cc  |   22 +
 12 files changed, 3034 insertions(+), 3 deletions(-)
 create mode 100644 include/abg-btf.h
 create mode 100644 include/abg-scc.h
 create mode 100644 src/abg-btf.cc
 create mode 100644 tests/test-scc.cc
 create mode 100644 tools/btfdiff.cc
 create mode 100644 tools/btfinfo.cc

-- 
2.32.0.272.g935e593368-goog


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-06-22 10:33 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-11 15:33 [PATCH 0/6] BTF ABI Giuliano Procida
2021-06-11 15:33 ` [PATCH 1/6] Tweak clang-format Giuliano Procida
2021-06-11 15:33 ` [PATCH 2/6] Allow C++17 code to be compiled Giuliano Procida
2021-06-11 15:33 ` [PATCH 3/6] BTF: add SCC finder and test Giuliano Procida
2021-06-11 15:33 ` [PATCH 4/6] BTF: add core functionality Giuliano Procida
2021-06-11 15:33 ` [PATCH 5/6] BTF: add btfinfo and btfdiff tools Giuliano Procida
2021-06-11 15:33 ` [PATCH 6/6] BTF: clang-format all the new source files Giuliano Procida
2021-06-22 10:33 ` [PATCH v2 0/6] BTF ABI Giuliano Procida
2021-06-22 10:33   ` [PATCH v2 1/6] Allow C++17 code to be compiled Giuliano Procida
2021-06-22 10:33   ` [PATCH v2 2/6] Tweak clang-format Giuliano Procida
2021-06-22 10:33   ` [PATCH v2 3/6] BTF: add SCC finder and test Giuliano Procida
2021-06-22 10:33   ` [PATCH v2 4/6] BTF: add core functionality Giuliano Procida
2021-06-22 10:33   ` [PATCH v2 5/6] BTF: add btfinfo and btfdiff tools Giuliano Procida
2021-06-22 10:33   ` [PATCH v2 6/6] BTF: clang-format all the new source files Giuliano Procida

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).