symbol.c (e57cfcdac6badd846a1cd831de54a1359c2d1eea) symbol.c (87f8ea4cd3680ef7f4da4391aed97abb25eae333)
1#include "util.h"
2#include "../perf.h"
3#include "string.h"
4#include "symbol.h"
5#include "thread.h"
6
7#include "debug.h"
8

--- 1175 unchanged lines hidden (view full) ---

1184}
1185
1186static int dsos__set_modules_path_dir(char *dirname)
1187{
1188 struct dirent *dent;
1189 DIR *dir = opendir(dirname);
1190
1191 if (!dir) {
1#include "util.h"
2#include "../perf.h"
3#include "string.h"
4#include "symbol.h"
5#include "thread.h"
6
7#include "debug.h"
8

--- 1175 unchanged lines hidden (view full) ---

1184}
1185
1186static int dsos__set_modules_path_dir(char *dirname)
1187{
1188 struct dirent *dent;
1189 DIR *dir = opendir(dirname);
1190
1191 if (!dir) {
1192 pr_err("%s: cannot open %s dir\n", __func__, dirname);
1192 pr_debug("%s: cannot open %s dir\n", __func__, dirname);
1193 return -1;
1194 }
1195
1196 while ((dent = readdir(dir)) != NULL) {
1197 char path[PATH_MAX];
1198
1199 if (dent->d_type == DT_DIR) {
1200 if (!strcmp(dent->d_name, ".") ||

--- 294 unchanged lines hidden (view full) ---

1495}
1496
1497int kernel_maps__init(bool use_modules)
1498{
1499 if (kernel_maps__create_kernel_map() < 0)
1500 return -1;
1501
1502 if (use_modules && kernel_maps__create_module_maps() < 0)
1193 return -1;
1194 }
1195
1196 while ((dent = readdir(dir)) != NULL) {
1197 char path[PATH_MAX];
1198
1199 if (dent->d_type == DT_DIR) {
1200 if (!strcmp(dent->d_name, ".") ||

--- 294 unchanged lines hidden (view full) ---

1495}
1496
1497int kernel_maps__init(bool use_modules)
1498{
1499 if (kernel_maps__create_kernel_map() < 0)
1500 return -1;
1501
1502 if (use_modules && kernel_maps__create_module_maps() < 0)
1503 pr_warning("Failed to load list of modules in use, "
1504 "continuing...\n");
1503 pr_debug("Failed to load list of modules in use, "
1504 "continuing...\n");
1505 /*
1506 * Now that we have all the maps created, just set the ->end of them:
1507 */
1508 kernel_maps__fixup_end();
1509 return 0;
1510}
1511
1512void symbol__init(unsigned int priv_size)
1513{
1514 elf_version(EV_CURRENT);
1515 symbol__priv_size = priv_size;
1516}
1505 /*
1506 * Now that we have all the maps created, just set the ->end of them:
1507 */
1508 kernel_maps__fixup_end();
1509 return 0;
1510}
1511
1512void symbol__init(unsigned int priv_size)
1513{
1514 elf_version(EV_CURRENT);
1515 symbol__priv_size = priv_size;
1516}