Object Introspection (OI) enables on-demand, hierarchical profiling of objects in arbitrary C/C++ programs with no recompilation.
Go to file
Jake Hillion a49f0e7410 codegenv2: improve multi argument generation (#395)
Summary:
Adds a new function `CodeGen::codegenFromDrgns` which runs multiple drgn root types through one `DrgnParser`. Stores the naming for the output within this function as we previously decided that when doing the actual codegen, which is too late with multiple root types.

This new function is used in `OIGenerator` when you have multiple OIL calls within one input object. Rather than producing separate `.o`s with likely duplicate code for each callsite, we produce a single `.o` that contains both calls. For calls with types with significant overlap this should be a significant reduction in work. The downside is the calls can't have different features, but this could be solved in the future by namespacing the code based on features/config within the generated `.cpp` - the pros seem to outweigh the con.

This should also be used with `oid` in multi probe mode as it would again significantly reduce the work it has to do. I didn't do this yet as it requires changing the cache. As I've got a big refactor cache ongoing at the minute it makes sense to wait until after that's landed to make this change.


Test Plan: Generally tested with GitHub CI. Tested the new multi call OILGen with the new example seen below. Outputs the following code with two root calls: P869569859 - note that `VectorOfStrings_0` is the only instance, whereas previously we'd have generated it in two files.

Differential Revision: D50835153

Pulled By: JakeHillion
2023-10-31 10:22:56 -07:00
.circleci CI: Skip some OIL capture keys tests on Clang 2023-09-28 19:42:49 -07:00
.github Add website deployment script 2022-12-20 08:40:51 -08:00
cmake Enable compiler warnings globally 2023-05-23 10:36:42 +01:00
examples clang-format: set BinPackParameters=false 2023-04-24 11:28:22 +02:00
extern drgn: elfutils: Implement 64-bits offsets reconstruction for CU/TU Index Table 2023-07-06 17:09:41 +01:00
include/oi tbv2: improve equality for iterator 2023-10-25 17:05:42 +01:00
oi codegenv2: improve multi argument generation (#395) 2023-10-31 10:22:56 -07:00
resources Compile Time OIL for OIL v2 2023-08-30 04:28:02 -07:00
test TopoSorter: Only allow certain params to be incomplete 2023-10-25 17:01:44 +01:00
tools oilgen: accept multiple config files (#379) 2023-10-11 16:25:13 -07:00
types tbv2: add a repeat instruction 2023-10-25 16:05:12 +01:00
website Use objectintrospection.org for the website 2023-09-21 20:59:46 +01:00
.clang-format clang-format: set BinPackParameters=false 2023-04-24 11:28:22 +02:00
.clang-tidy Initial commit 2022-12-19 06:37:51 -08:00
.editorconfig Initial commit 2022-12-19 06:37:51 -08:00
.git-blame-ignore-revs Initial commit 2022-12-19 06:37:51 -08:00
.gitignore Delete old files from test/ 2023-01-27 12:45:35 +00:00
.gitmodules drgn: add split dwarf support 2023-06-02 17:52:53 +02:00
CHANGELOG.md Initial commit 2022-12-19 06:37:51 -08:00
CMakeLists.txt compiler: update to c++20 2023-10-25 15:55:18 +01:00
CODE_OF_CONDUCT.md Initial commit 2022-12-19 06:37:51 -08:00
CONTRIBUTING.md Initial commit 2022-12-19 06:37:51 -08:00
dev.oid.toml Implement new container for F14ValueMap 2023-09-08 16:31:36 +02:00
LICENSE Initial commit 2022-12-19 06:37:51 -08:00
oss.oid.toml Initial commit 2022-12-19 06:37:51 -08:00
README.md Use objectintrospection.org for the website 2023-09-21 20:59:46 +01:00

object-introspection

Matrix Chat

OI Logo

Object Introspection is a memory profiling technology for C++ objects. It provides the ability to dynamically instrument applications to capture the precise memory occupancy of entire object hierarchies including all containers and dynamic allocations. All this with no code modification or recompilation!

For more information on the technology and how to get started applying it to your applications please check out the Object Introspection website.

Join the Object Introspection community

See the CONTRIBUTING file for how to help out.

License

Object Introspection is licensed under the Apache 2.0 License.