Linux Perf
machine.c
Go to the documentation of this file.
1 // SPDX-License-Identifier: GPL-2.0
2 #include <unistd.h>
3 #include <stdio.h>
4 #include <string.h>
5 #include "util.h"
6 #include "machine.h"
7 #include "api/fs/fs.h"
8 
9 int arch__fix_module_text_start(u64 *start, const char *name)
10 {
11  char path[PATH_MAX];
12 
13  snprintf(path, PATH_MAX, "module/%.*s/sections/.text",
14  (int)strlen(name) - 2, name + 1);
15 
16  if (sysfs__read_ull(path, (unsigned long long *)start) < 0)
17  return -1;
18 
19  return 0;
20 }
const char * name
#define PATH_MAX
Definition: jevents.c:1042
u64 start
Definition: hists_common.c:25
int arch__fix_module_text_start(u64 *start, const char *name)
Definition: machine.c:9