diff --git a/lisa/_assets/kmodules/lisa/Makefile b/lisa/_assets/kmodules/lisa/Makefile index f73001a258bdedd94e7004140c09f1d2f93a6f70..639d75eaf07c5e2c64eac8638f27ee056c7ac265 100644 --- a/lisa/_assets/kmodules/lisa/Makefile +++ b/lisa/_assets/kmodules/lisa/Makefile @@ -139,7 +139,7 @@ $(RUST_OBJECT) $(RUST_C_SHIMS_H) $(RUST_C_SHIMS_C): $(RUST_BUILD_DIR) $(CARGO_TA # which we unfortunately need intact for linking, so we make a copy for # each of those tool to play with. cp $(RUST_OBJECT) $(RUST_OBJECT)_objdump.o - $(OBJDUMP) -h $(RUST_OBJECT)_objdump.o | awk '{ print $$2 }' | grep '^.binstore.c.' | xargs -n1 sh -c 'cp -f $(RUST_OBJECT) $(RUST_OBJECT)_objcopy.o && $(OBJCOPY) --dump-section $$0=$(RUST_C_SHIMS_DIR)/shim_$$0 $(RUST_OBJECT)_objcopy.o $(RUST_OBJECT)_objcopy.fake_out.o; rm $(RUST_OBJECT)_objcopy.fake_out.o 2>/dev/null || true' + $(OBJDUMP) -h $(RUST_OBJECT)_objdump.o | awk '{ print $$2 }' | grep '^.binstore.c.' | xargs -n1 sh -c '$(OBJCOPY) --dump-section $$0=$(RUST_C_SHIMS_DIR)/shim_$$0 $(RUST_OBJECT) /dev/null' LC_ALL=C cat $(RUST_C_SHIMS_DIR)/shim_.binstore.c.header.* > $(RUST_C_SHIMS_H) LC_ALL=C cat $(RUST_C_SHIMS_DIR)/shim_.binstore.c.code.* > $(RUST_C_SHIMS_C) cat $(RUST_C_SHIMS_H) $(RUST_C_SHIMS_C) | if which clang-format 2>&1 1>/dev/null; then clang-format; else cat; fi diff --git a/lisa/_btf.py b/lisa/_btf.py index 9ae24950ad6b550fba74382381ff4ab6c8c17937..2150a1835124be298d3af4269c6c08e01ad3400f 100644 --- a/lisa/_btf.py +++ b/lisa/_btf.py @@ -249,7 +249,7 @@ class _CDeclSpecifier(_TransparentType, _CDecl, BTFType): def __str__(self): return self._c_specifier - def _do_dump_c_decls(self, ctx, anonymous=False, memoize=True): + def _do_dump_c_decls(self, ctx, anonymous=False, **kwargs): typ = self.typ # It is important to dump anonymous struct/union as an inline @@ -260,7 +260,7 @@ class _CDeclSpecifier(_TransparentType, _CDecl, BTFType): typename = typ._dump_c_decls( ctx, anonymous=anonymous, - memoize=memoize + **kwargs, ) return f'{self._c_specifier} {typename}' # Qualifying a function type is forbidden by C spec. For some reason, @@ -1177,9 +1177,9 @@ class BTFDeclTag(_TransparentType, _CDecl, BTFType): self.typ = typ self.component_idx = component_idx - def _do_dump_c_decls(self, ctx): + def _do_dump_c_decls(self, ctx, **kwargs): # TODO: actually add __attribute__((the btf_decl_tag())) - return self.typ._do_dump_c_decls(ctx) + return self.typ._do_dump_c_decls(ctx, **kwargs) class BTFTypeTag(_CDeclSpecifier):