Merge tag 'for-linus-6.9-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubca...
[linux-2.6-microblaze.git] / tools / perf / builtin-inject.c
index c8cf2fd..eb3ef5c 100644 (file)
@@ -2265,6 +2265,12 @@ int cmd_inject(int argc, const char **argv)
                "perf inject [<options>]",
                NULL
        };
+
+       if (!inject.itrace_synth_opts.set) {
+               /* Disable eager loading of kernel symbols that adds overhead to perf inject. */
+               symbol_conf.lazy_load_kernel_maps = true;
+       }
+
 #ifndef HAVE_JITDUMP
        set_option_nobuild(options, 'j', "jit", "NO_LIBELF=1", true);
 #endif