Home
last modified time | relevance | path

Searched refs:addr (Results 1 – 25 of 62) sorted by relevance

123

/tools/testing/selftests/vm/
Dmap_hugetlb.c34 static void check_bytes(char *addr) in check_bytes() argument
36 printf("First hex is %x\n", *((unsigned int *)addr)); in check_bytes()
39 static void write_bytes(char *addr) in write_bytes() argument
44 *(addr + i) = (char)i; in write_bytes()
47 static int read_bytes(char *addr) in read_bytes() argument
51 check_bytes(addr); in read_bytes()
53 if (*(addr + i) != (char)i) { in read_bytes()
62 void *addr; in main() local
65 addr = mmap(ADDR, LENGTH, PROTECTION, FLAGS, 0, 0); in main()
66 if (addr == MAP_FAILED) { in main()
[all …]
Dhugepage-mmap.c38 static void check_bytes(char *addr) in check_bytes() argument
40 printf("First hex is %x\n", *((unsigned int *)addr)); in check_bytes()
43 static void write_bytes(char *addr) in write_bytes() argument
48 *(addr + i) = (char)i; in write_bytes()
51 static int read_bytes(char *addr) in read_bytes() argument
55 check_bytes(addr); in read_bytes()
57 if (*(addr + i) != (char)i) { in read_bytes()
66 void *addr; in main() local
75 addr = mmap(ADDR, LENGTH, PROTECTION, FLAGS, fd, 0); in main()
76 if (addr == MAP_FAILED) { in main()
[all …]
/tools/perf/util/include/linux/
Dbitops.h19 #define for_each_set_bit(bit, addr, size) \ argument
20 for ((bit) = find_first_bit((addr), (size)); \
22 (bit) = find_next_bit((addr), (size), (bit) + 1))
25 #define for_each_set_bit_from(bit, addr, size) \ argument
26 for ((bit) = find_next_bit((addr), (size), (bit)); \
28 (bit) = find_next_bit((addr), (size), (bit) + 1))
30 static inline void set_bit(int nr, unsigned long *addr) in set_bit() argument
32 addr[nr / BITS_PER_LONG] |= 1UL << (nr % BITS_PER_LONG); in set_bit()
35 static inline void clear_bit(int nr, unsigned long *addr) in clear_bit() argument
37 addr[nr / BITS_PER_LONG] &= ~(1UL << (nr % BITS_PER_LONG)); in clear_bit()
[all …]
/tools/power/acpi/
Dacpidump.c80 static unsigned long psz, addr, length; variable
87 unsigned long addr; in read_efi_systab() local
91 if (sscanf(buffer, "ACPI20=0x%lx", &addr) == 1) in read_efi_systab()
92 return addr; in read_efi_systab()
189 static void acpi_show_table(int fd, struct acpi_table_header *table, unsigned long addr) in acpi_show_table() argument
192 int len = snprintf(buff, 80, "%.4s @ %p\n", table->signature, (void *)addr); in acpi_show_table()
199 static void write_table(int fd, struct acpi_table_header *tbl, unsigned long addr) in write_table() argument
204 acpi_show_table(fd, tbl, addr); in write_table()
214 acpi_show_table(fd, tbl, addr); in write_table()
224 unsigned long addr; in acpi_dump_FADT() local
[all …]
/tools/perf/util/
Ddwarf-aux.c81 int cu_find_lineinfo(Dwarf_Die *cu_die, unsigned long addr, in cu_find_lineinfo() argument
87 line = dwarf_getsrc_die(cu_die, (Dwarf_Addr)addr); in cu_find_lineinfo()
89 addr == (unsigned long)laddr && dwarf_lineno(line, lineno) == 0) { in cu_find_lineinfo()
111 int cu_walk_functions_at(Dwarf_Die *cu_die, Dwarf_Addr addr, in cu_walk_functions_at() argument
119 for (sc_die = die_find_realfunc(cu_die, addr, &die_mem); in cu_walk_functions_at()
121 sc_die = die_find_child(sc_die, __die_find_inline_cb, &addr, in cu_walk_functions_at()
386 Dwarf_Addr addr; member
396 dwarf_haspc(fn_die, ad->addr)) { in __die_search_func_cb()
412 Dwarf_Die *die_find_realfunc(Dwarf_Die *cu_die, Dwarf_Addr addr, in die_find_realfunc() argument
416 ad.addr = addr; in die_find_realfunc()
[all …]
Ddwarf-aux.h34 extern int cu_find_lineinfo(Dwarf_Die *cudie, unsigned long addr,
38 extern int cu_walk_functions_at(Dwarf_Die *cu_die, Dwarf_Addr addr,
76 extern Dwarf_Die *die_find_realfunc(Dwarf_Die *cu_die, Dwarf_Addr addr,
80 extern Dwarf_Die *die_find_inlinefunc(Dwarf_Die *sp_die, Dwarf_Addr addr,
89 Dwarf_Addr addr, void *data);
100 Dwarf_Addr addr, Dwarf_Die *die_mem);
Dthread.h36 enum map_type type, u64 addr) in thread__find_map() argument
38 return self ? map_groups__find(&self->mg, type, addr) : NULL; in thread__find_map()
42 u8 cpumode, enum map_type type, u64 addr,
46 u8 cpumode, enum map_type type, u64 addr,
Dprobe-finder.c185 Dwarf_Addr addr) in debuginfo__init_online_kernel_dwarf() argument
195 self->dbg = dwfl_addrdwarf(self->dwfl, addr, &self->bias); in debuginfo__init_online_kernel_dwarf()
199 (unsigned long)addr); in debuginfo__init_online_kernel_dwarf()
210 Dwarf_Addr addr __maybe_unused) in debuginfo__init_online_kernel_dwarf()
238 struct debuginfo *debuginfo__new_online_kernel(unsigned long addr) in debuginfo__new_online_kernel() argument
244 if (debuginfo__init_online_kernel_dwarf(self, (Dwarf_Addr)addr) < 0) { in debuginfo__new_online_kernel()
278 static int convert_variable_location(Dwarf_Die *vr_die, Dwarf_Addr addr, in convert_variable_location() argument
296 dwarf_getlocation_addr(&attr, addr, &op, &nops, 1) <= 0 || in convert_variable_location()
603 ret = convert_variable_location(vr_die, pf->addr, pf->fb_ops, in convert_variable()
664 if (!die_find_variable_at(sc_die, pf->pvar->var, pf->addr, &vr_die)) { in find_variable()
[all …]
Dunwind.c337 unw_word_t __maybe_unused addr, in get_proc_name() argument
345 static int access_dso_mem(struct unwind_info *ui, unw_word_t addr, in access_dso_mem() argument
352 MAP__FUNCTION, addr, &al); in access_dso_mem()
354 pr_debug("unwind: no map for %lx\n", (unsigned long)addr); in access_dso_mem()
362 addr, (u8 *) data, sizeof(*data)); in access_dso_mem()
385 unw_word_t addr, unw_word_t *valp, in access_mem() argument
408 if (addr + sizeof(unw_word_t) < addr) in access_mem()
411 if (addr < start || addr + sizeof(unw_word_t) >= end) { in access_mem()
412 ret = access_dso_mem(ui, addr, valp); in access_mem()
415 (void *)addr, (void *)start, (void *)end); in access_mem()
[all …]
Dprobe-finder.h31 extern struct debuginfo *debuginfo__new_online_kernel(unsigned long addr);
42 unsigned long addr,
63 Dwarf_Addr addr; /* Address */ member
Dmap.h102 u64 addr, symbol_filter_t filter);
114 struct map *maps__find(struct rb_root *maps, u64 addr);
123 u64 addr);
137 enum map_type type, u64 addr) in map_groups__find() argument
139 return maps__find(&mg->maps[type], addr); in map_groups__find()
143 enum map_type type, u64 addr,
Dtrace-event-parse.c189 unsigned long long addr; in parse_proc_kallsyms() local
201 addr = strtoull(addr_str, NULL, 16); in parse_proc_kallsyms()
210 pevent_register_function(pevent, func, addr, mod); in parse_proc_kallsyms()
219 unsigned long long addr; in parse_ftrace_printk() local
233 addr = strtoull(addr_str, NULL, 16); in parse_ftrace_printk()
237 pevent_register_print_string(pevent, printk, addr); in parse_ftrace_printk()
Dutil.c89 void *addr; in copyfile() local
106 addr = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fromfd, 0); in copyfile()
107 if (addr == MAP_FAILED) in copyfile()
110 if (write(tofd, addr, st.st_size) == st.st_size) in copyfile()
113 munmap(addr, st.st_size); in copyfile()
Dannotate.c54 ops->target.addr = strtoull(ops->raw, &endptr, 16); in call__parse()
75 ops->target.addr = 0; in call__parse()
83 ops->target.addr = strtoull(tok + 1, NULL, 16); in call__parse()
93 if (ops->target.addr == 0) in call__scnprintf()
96 return scnprintf(bf, size, "%-6.6s *%" PRIx64, ins->name, ops->target.addr); in call__scnprintf()
113 ops->target.addr = strtoll(ops->raw, NULL, 16); in jump__parse()
253 comment__symbol(ops->source.raw, comment, &ops->source.addr, &ops->source.name); in mov__parse()
254 comment__symbol(ops->target.raw, comment, &ops->target.addr, &ops->target.name); in mov__parse()
301 comment__symbol(ops->target.raw, comment, &ops->target.addr, &ops->target.name); in dec__parse()
468 int evidx, u64 addr) in symbol__inc_addr_samples() argument
[all …]
Dannotate.h21 u64 addr; member
28 u64 addr; member
78 u64 addr[0]; member
136 int evidx, u64 addr);
Dmachine.h108 enum map_type type, u64 addr, in machine__find_kernel_symbol() argument
112 return map_groups__find_symbol(&machine->kmaps, type, addr, in machine__find_kernel_symbol()
117 struct symbol *machine__find_kernel_function(struct machine *machine, u64 addr, in machine__find_kernel_function() argument
121 return machine__find_kernel_symbol(machine, MAP__FUNCTION, addr, in machine__find_kernel_function()
Dsymbol.h135 u64 addr; member
149 u64 addr; member
169 u64 addr; member
215 u64 addr);
Devent.c594 enum map_type type, u64 addr, in thread__find_addr_map() argument
600 al->addr = addr; in thread__find_addr_map()
640 al->map = map_groups__find(mg, type, al->addr); in thread__find_addr_map()
651 if ((long long)al->addr < 0 && in thread__find_addr_map()
658 al->addr = al->map->map_ip(al->map, al->addr); in thread__find_addr_map()
662 u8 cpumode, enum map_type type, u64 addr, in thread__find_addr_location() argument
666 thread__find_addr_map(thread, machine, cpumode, type, addr, al); in thread__find_addr_location()
668 al->sym = map__find_symbol(al->map, al->addr, filter); in thread__find_addr_location()
720 al->sym = map__find_symbol(al->map, al->addr, filter); in perf_event__preprocess_sample()
/tools/hv/
Dhv_vss_daemon.c43 static struct sockaddr_nl addr; variable
132 message.msg_name = &addr; in netlink_send()
133 message.msg_namelen = sizeof(addr); in netlink_send()
162 addr.nl_family = AF_NETLINK; in main()
163 addr.nl_pad = 0; in main()
164 addr.nl_pid = 0; in main()
165 addr.nl_groups = 0; in main()
168 error = bind(fd, (struct sockaddr *)&addr, sizeof(addr)); in main()
198 struct sockaddr *addr_p = (struct sockaddr *) &addr; in main()
199 socklen_t addr_l = sizeof(addr); in main()
[all …]
Dhv_kvp_daemon.c84 static struct sockaddr_nl addr; variable
874 struct sockaddr_in *addr; in kvp_process_ip_address() local
881 addr = (struct sockaddr_in *)addrp; in kvp_process_ip_address()
882 str = inet_ntop(family, &addr->sin_addr, tmp, 50); in kvp_process_ip_address()
1049 static int expand_ipv6(char *addr, int type) in expand_ipv6() argument
1054 ret = inet_pton(AF_INET6, addr, &v6_addr); in expand_ipv6()
1062 sprintf(addr, "%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:" in expand_ipv6()
1077 static int is_ipv4(char *addr) in is_ipv4() argument
1082 ret = inet_pton(AF_INET, addr, &ipv4_addr); in is_ipv4()
1141 char addr[INET6_ADDRSTRLEN]; in process_ip_string() local
[all …]
/tools/perf/tests/
Drdpmc.c32 static u64 mmap_read_self(void *addr) in mmap_read_self() argument
34 struct perf_event_mmap_page *pc = addr; in mmap_read_self()
96 void *addr; in __test__rdpmc() local
116 addr = mmap(NULL, page_size, PROT_READ, MAP_SHARED, fd, 0); in __test__rdpmc()
117 if (addr == (void *)(-1)) { in __test__rdpmc()
126 stamp = mmap_read_self(addr); in __test__rdpmc()
131 now = mmap_read_self(addr); in __test__rdpmc()
140 munmap(addr, page_size); in __test__rdpmc()
/tools/perf/
Dbuiltin-lock.c49 void *addr; /* address of lockdep_map, used as ID */ member
101 void *addr; member
308 static struct lock_stat *lock_stat_findnew(void *addr, const char *name) in lock_stat_findnew() argument
310 struct list_head *entry = lockhashentry(addr); in lock_stat_findnew()
314 if (ret->addr == addr) in lock_stat_findnew()
322 new->addr = addr; in lock_stat_findnew()
352 static struct lock_seq_stat *get_seq(struct thread_stat *ts, void *addr) in get_seq() argument
357 if (seq->addr == addr) in get_seq()
367 seq->addr = addr; in get_seq()
391 void *addr; in report_lock_acquire_event() local
[all …]
/tools/virtio/linux/
Dvirtio.h17 static inline void clear_bit(int nr, volatile unsigned long *addr) in clear_bit() argument
20 unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); in clear_bit()
25 static inline int test_bit(int nr, const volatile unsigned long *addr) in test_bit() argument
27 return 1UL & (addr[BIT_WORD(nr)] >> (nr & (BITS_PER_LONG-1))); in test_bit()
/tools/lguest/
Dlguest.c251 static void *from_guest_phys(unsigned long addr) in from_guest_phys() argument
253 return guest_base + addr; in from_guest_phys()
256 static unsigned long to_guest_phys(const void *addr) in to_guest_phys() argument
258 return (addr - guest_base); in to_guest_phys()
279 void *addr; in map_zeroed_pages() local
286 addr = mmap(NULL, getpagesize() * (num+2), in map_zeroed_pages()
289 if (addr == MAP_FAILED) in map_zeroed_pages()
292 if (mprotect(addr + getpagesize(), getpagesize() * num, in map_zeroed_pages()
303 return addr + getpagesize(); in map_zeroed_pages()
309 void *addr = from_guest_phys(guest_limit); in get_pages() local
[all …]
/tools/virtio/
Dvringh_test.c35 static bool getrange_iov(struct vringh *vrh, u64 addr, struct vringh_range *r) in getrange_iov() argument
37 if (addr < (u64)(unsigned long)__user_addr_min - user_addr_offset) in getrange_iov()
39 if (addr >= (u64)(unsigned long)__user_addr_max - user_addr_offset) in getrange_iov()
49 static bool getrange_slow(struct vringh *vrh, u64 addr, struct vringh_range *r) in getrange_slow() argument
51 if (addr < (u64)(unsigned long)__user_addr_min - user_addr_offset) in getrange_slow()
53 if (addr >= (u64)(unsigned long)__user_addr_max - user_addr_offset) in getrange_slow()
56 r->start = addr; in getrange_slow()
131 u64 addr, struct vringh_range *r), in parallel_test() argument
443 bool (*getrange)(struct vringh *vrh, u64 addr, struct vringh_range *r); in main()
676 assert(vring.desc[0].addr == (unsigned long)d); in main()
[all …]

123