Lines Matching defs:module

153 	const char *module;
161 const char *short_name = dso->short_name; /* short_name is "[module]" */
164 if (strncmp(short_name + 1, args->module, short_name_len - 2) == 0 &&
165 args->module[short_name_len - 2] == '\0') {
172 static struct map *kernel_get_module_map(const char *module)
175 .module = module,
179 /* A file path -- this is an offline module */
180 if (module && strchr(module, '/'))
181 return dso__new_map(module);
183 if (!module) {
287 * @module can be module name of module file path. In case of path,
288 * inspect elf and find out what is actual module name.
291 static char *find_module_name(const char *module)
302 fd = open(module, O_RDONLY);
324 * '.gnu.linkonce.this_module' section of kernel module elf directly
325 * maps to 'struct module' from linux/module.h. This section contains
326 * actual module name which will be used by kernel after loading it.
327 * But, we cannot use 'struct module' here since linux/module.h is not
347 static int kernel_get_module_dso(const char *module, struct dso **pdso)
354 if (module) {
357 snprintf(module_name, sizeof(module_name), "[%s]", module);
364 pr_debug("Failed to find module %s.\n", module);
530 /* Open new debuginfo of given module */
531 static struct debuginfo *open_debuginfo(const char *module, struct nsinfo *nsi,
534 const char *path = module;
541 if (!module || !strchr(module, '/')) {
542 err = kernel_get_module_dso(module, &dso);
554 if (module)
555 pr_err("Module %s is not loaded, please specify its full path name.\n", module);
567 if (!module || !strtailcmp(path, ".ko"))
581 static struct debuginfo *debuginfo_cache__open(const char *module, bool silent)
583 const char *path = module;
585 /* If the module is NULL, it should be the kernel. */
586 if (!module)
592 /* Copy module path */
601 debuginfo_cache = open_debuginfo(module, NULL, silent);
671 ret = get_text_start_address(tp->module, &stext, NULL);
676 /* If the module is given, this returns relative address */
678 false, !!tp->module);
685 tp->module ? : "kernel");
687 dinfo = debuginfo_cache__open(tp->module, verbose <= 0);
785 tevs[i].point.module = strdup(exec);
786 if (!tevs[i].point.module) {
798 int ntevs, const char *module,
806 if (!module)
809 map = get_target_map(module, NULL, false);
811 pr_warning("Failed to get ELF symbols for %s\n", module);
815 mod_name = find_module_name(module);
821 tevs[i].point.module =
822 strdup(mod_name ? mod_name : module);
823 if (!tevs[i].point.module) {
899 int ntevs, const char *module,
905 ret = add_exec_to_probe_trace_events(tevs, ntevs, module,
907 else if (module)
910 module, dinfo);
932 * same issue with kernel module. The retprobe doesn`t need debuginfo.
1048 static int __show_line_range(struct line_range *lr, const char *module,
1062 dinfo = open_debuginfo(module, NULL, false);
1068 ret = get_alternative_line_range(dinfo, lr, module, user);
1142 int show_line_range(struct line_range *lr, const char *module,
1152 ret = __show_line_range(lr, module, user);
1279 const char *module __maybe_unused,
1904 /* Scan module name(if there), function name and offset */
1907 tp->module = strndup(argv[1], p - argv[1]);
1908 if (!tp->module) {
1912 tev->uprobes = (tp->module[0] == '/');
2177 /* Uprobes must have tp->module */
2178 if (!tp->module)
2190 err = strbuf_addf(buf, "%s:0x%" PRIx64, tp->module, tp->address);
2205 return strbuf_addf(buf, "%s%s0x%" PRIx64, tp->module ?: "",
2206 tp->module ? ":" : "", tp->address);
2208 return strbuf_addf(buf, "%s%s%s+%lu", tp->module ?: "",
2209 tp->module ? ":" : "", tp->symbol, tp->offset);
2252 map = dso__new_map(tp->module);
2465 zfree(&tev->point.module);
2592 const char *module,
2612 if (!ret && module)
2613 ret = strbuf_addf(result, " in %s", module);
2634 const char *module, bool use_stdout)
2639 ret = perf_probe_event__sprintf(group, event, pev, module, &buf);
2692 &pev, tev.point.module,
3151 /* Check the kprobe (not in module) is within .text */
3168 tev->point.module = strdup_or_goto(pev->target,
3172 tev->point.module =
3175 if (!tev->point.module)
3276 tp->module = strdup(pev->target);
3277 if (!tp->module)