Lines Matching defs:module

152 static struct map *kernel_get_module_map(const char *module)
157 /* A file path -- this is an offline module */
158 if (module && strchr(module, '/'))
159 return dso__new_map(module);
161 if (!module) {
168 /* short_name is "[module]" */
173 if (strncmp(short_name + 1, module,
175 module[short_name_len - 2] == '\0') {
275 * @module can be module name of module file path. In case of path,
276 * inspect elf and find out what is actual module name.
279 static char *find_module_name(const char *module)
290 fd = open(module, O_RDONLY);
312 * '.gnu.linkonce.this_module' section of kernel module elf directly
313 * maps to 'struct module' from linux/module.h. This section contains
314 * actual module name which will be used by kernel after loading it.
315 * But, we cannot use 'struct module' here since linux/module.h is not
335 static int kernel_get_module_dso(const char *module, struct dso **pdso)
342 if (module) {
345 snprintf(module_name, sizeof(module_name), "[%s]", module);
351 pr_debug("Failed to find module %s.\n", module);
517 /* Open new debuginfo of given module */
518 static struct debuginfo *open_debuginfo(const char *module, struct nsinfo *nsi,
521 const char *path = module;
528 if (!module || !strchr(module, '/')) {
529 err = kernel_get_module_dso(module, &dso);
541 if (module)
542 pr_err("Module %s is not loaded, please specify its full path name.\n", module);
554 if (!module || !strtailcmp(path, ".ko"))
568 static struct debuginfo *debuginfo_cache__open(const char *module, bool silent)
570 const char *path = module;
572 /* If the module is NULL, it should be the kernel. */
573 if (!module)
579 /* Copy module path */
588 debuginfo_cache = open_debuginfo(module, NULL, silent);
658 ret = get_text_start_address(tp->module, &stext, NULL);
663 /* If the module is given, this returns relative address */
665 false, !!tp->module);
672 tp->module ? : "kernel");
674 dinfo = debuginfo_cache__open(tp->module, verbose <= 0);
772 tevs[i].point.module = strdup(exec);
773 if (!tevs[i].point.module) {
785 int ntevs, const char *module,
793 if (!module)
796 map = get_target_map(module, NULL, false);
798 pr_warning("Failed to get ELF symbols for %s\n", module);
802 mod_name = find_module_name(module);
808 tevs[i].point.module =
809 strdup(mod_name ? mod_name : module);
810 if (!tevs[i].point.module) {
886 int ntevs, const char *module,
892 ret = add_exec_to_probe_trace_events(tevs, ntevs, module,
894 else if (module)
897 module, dinfo);
919 * same issue with kernel module. The retprobe doesn`t need debuginfo.
1035 static int __show_line_range(struct line_range *lr, const char *module,
1049 dinfo = open_debuginfo(module, NULL, false);
1055 ret = get_alternative_line_range(dinfo, lr, module, user);
1129 int show_line_range(struct line_range *lr, const char *module,
1139 ret = __show_line_range(lr, module, user);
1266 const char *module __maybe_unused,
1891 /* Scan module name(if there), function name and offset */
1894 tp->module = strndup(argv[1], p - argv[1]);
1895 if (!tp->module) {
1899 tev->uprobes = (tp->module[0] == '/');
2164 /* Uprobes must have tp->module */
2165 if (!tp->module)
2177 err = strbuf_addf(buf, "%s:0x%" PRIx64, tp->module, tp->address);
2192 return strbuf_addf(buf, "%s%s0x%" PRIx64, tp->module ?: "",
2193 tp->module ? ":" : "", tp->address);
2195 return strbuf_addf(buf, "%s%s%s+%lu", tp->module ?: "",
2196 tp->module ? ":" : "", tp->symbol, tp->offset);
2239 map = dso__new_map(tp->module);
2454 zfree(&tev->point.module);
2581 const char *module,
2601 if (!ret && module)
2602 ret = strbuf_addf(result, " in %s", module);
2623 const char *module, bool use_stdout)
2628 ret = perf_probe_event__sprintf(group, event, pev, module, &buf);
2681 &pev, tev.point.module,
3140 /* Check the kprobe (not in module) is within .text */
3157 tev->point.module = strdup_or_goto(pev->target,
3161 tev->point.module =
3164 if (!tev->point.module)
3265 tp->module = strdup(pev->target);
3266 if (!tp->module)