From 89ba308506249736c6d0c8490d3c897af4e42df8 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Tue, 8 Sep 2009 20:23:42 -0400 Subject: PR10524: reduce massive-uprobe script modules' .data consumption The general approach is to rip out task_finder_tgt's from all over the place (including the unwindsym vmcbs, and the stap_uprobe_specs), and instead have a small handful of them: one for all unwindsyms, and one per abstract probed process (PID or NAME). These are in turn shared by all new stap_unwind_specs by index. Before: probe process("./stap").function("*") -rw-r--r--. 1 fche users 11775283 2009-09-08 20:26 /var/tmp/fche/systemtap/cache/96/stap_96c0479d674db55ec98d8a8750a790e7_7989596.ko text data bss dec hex filename 445158 8351944 4306472 13103574 c7f1d6 /var/tmp/fche/systemtap/cache/96/stap_96c0479d674db55ec98d8a8750a790e7_7989596.ko After: (Note how data shrank, though text gained a bit in const-init-data.) -rw-r--r--. 1 fche users 4021569 2009-09-08 20:27 /var/tmp/fche/systemtap/cache/e4/stap_e46e88634efd850b1586e81c231c239a_8058419.ko text data bss dec hex filename 1896511 2192 4324808 6223511 5ef697 /var/tmp/fche/systemtap/cache/e4/stap_e46e88634efd850b1586e81c231c239a_8058419.ko * tapsets.cxx (uprobe_derived_probe_group): Rewrite emit_module_decls, and adjust emit_module_init. * runtime/sym.c (_stp_sym_init): Initialize unwindsyms-shared vmcb. * runtime/sym.h (_stp_module): Remove *vmcb field. * translate.cxx (emit_module_init, dump_unwindsyms): Adapt. * translate.h (assert_0_indent): Flush output before possibly assert-failing. --- translate.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'translate.h') diff --git a/translate.h b/translate.h index d1bff678..5a0e0a4a 100644 --- a/translate.h +++ b/translate.h @@ -33,7 +33,7 @@ public: std::ostream& newline (int indent = 0); void indent (int indent = 0); - void assert_0_indent () { assert (tablevel == 0); } + void assert_0_indent () { o << std::flush; assert (tablevel == 0); } std::ostream& line(); std::ostream::pos_type tellp() { return o.tellp(); } -- cgit