Home | History | Annotate | Download | only in liblegacy

Lines Matching defs:module

3  * Dealing with the kernel and kernel module samples
29 /* kernel module */
40 /* kernel and module support */
73 * opd_create_module - allocate and initialise a module description
74 * @param name module name
81 struct opd_module * module = xmalloc(sizeof(struct opd_module));
83 module->name = xstrdup(name);
84 module->image = NULL;
85 module->start = start;
86 module->end = end;
87 list_add(&module->module_list, &opd_modules);
89 return module;
94 * opd_find_module_by_name - find a module by name, ccreating a new once if
96 * @param name module name
101 struct opd_module * module;
104 module = list_entry(pos, struct opd_module, module_list);
105 if (!strcmp(name, module->name))
106 return module;
117 struct opd_module * module;
119 verbprintf(vmodule, "Removing module list\n");
121 module = list_entry(pos, struct opd_module, module_list);
122 free(module->name);
123 free(module);
137 * to this file which allows determination of the module image
147 * of a module so we need to parse all the /proc/ksyms.
163 printf("oprofiled: /proc/ksyms not readable, can't process module samples.\n");
167 verbprintf(vmodule, "Read module info.\n");
259 * opd_drop_module_sample - drop a module sample efficiently
263 * after re-reading /proc/ksyms. It's either a rogue sample, or from a module
265 * query_module() if we can place it in a symbol-less module, and if so create
299 verbprintf(vmodule, "Sample from unprofilable module %s\n", name);
314 * opd_find_module_by_eip - find a module by its eip
317 * find in the modules container the module which
319 * caller must check than the module image is valid
324 struct opd_module * module;
327 module = list_entry(pos, struct opd_module, module_list);
328 if (module->start <= eip && module->end > eip)
329 return module;
337 * opd_handle_module_sample - process a module sample
341 * Process a sample in module address space. The sample eip
342 * is matched against module information. If the search was
349 * If the sample could not be located in a module, it is treated
354 struct opd_module * module;
356 module = opd_find_module_by_eip(eip);
357 if (!module) {
362 module = opd_find_module_by_eip(eip);
365 if (module) {
366 if (module->image != NULL) {
368 opd_put_image_sample(module->image,
369 eip - module->start, counter);
372 verbprintf(vmodule, "No image for sampled module %s\n",
373 module->name);
389 /* in a module */
413 struct opd_module * module;
435 module = opd_find_module_by_eip(eip);
436 if (!module) {
441 module = opd_find_module_by_eip(eip);
444 if (module) {
445 /* module->name is only the module name not the full path */
447 if (module->image)
448 module_name = module->image->name;
450 verbprintf(vmodule, "unable to get path name for module %s\n",
451 module->name);
452 module_name = module->name;
457 module->name, app_name);
460 opd_add_mapping(proc, image, module->start, 0, module->end);