Home
last modified time | relevance | path

Searched refs:p (Results 1 – 25 of 103) sorted by relevance

12345

/tools/include/tools/
Dle_byteshift.h6 static inline uint16_t __get_unaligned_le16(const uint8_t *p) in __get_unaligned_le16() argument
8 return p[0] | p[1] << 8; in __get_unaligned_le16()
11 static inline uint32_t __get_unaligned_le32(const uint8_t *p) in __get_unaligned_le32() argument
13 return p[0] | p[1] << 8 | p[2] << 16 | p[3] << 24; in __get_unaligned_le32()
16 static inline uint64_t __get_unaligned_le64(const uint8_t *p) in __get_unaligned_le64() argument
18 return (uint64_t)__get_unaligned_le32(p + 4) << 32 | in __get_unaligned_le64()
19 __get_unaligned_le32(p); in __get_unaligned_le64()
22 static inline void __put_unaligned_le16(uint16_t val, uint8_t *p) in __put_unaligned_le16() argument
24 *p++ = val; in __put_unaligned_le16()
25 *p++ = val >> 8; in __put_unaligned_le16()
[all …]
Dbe_byteshift.h6 static inline uint16_t __get_unaligned_be16(const uint8_t *p) in __get_unaligned_be16() argument
8 return p[0] << 8 | p[1]; in __get_unaligned_be16()
11 static inline uint32_t __get_unaligned_be32(const uint8_t *p) in __get_unaligned_be32() argument
13 return p[0] << 24 | p[1] << 16 | p[2] << 8 | p[3]; in __get_unaligned_be32()
16 static inline uint64_t __get_unaligned_be64(const uint8_t *p) in __get_unaligned_be64() argument
18 return (uint64_t)__get_unaligned_be32(p) << 32 | in __get_unaligned_be64()
19 __get_unaligned_be32(p + 4); in __get_unaligned_be64()
22 static inline void __put_unaligned_be16(uint16_t val, uint8_t *p) in __put_unaligned_be16() argument
24 *p++ = val >> 8; in __put_unaligned_be16()
25 *p++ = val; in __put_unaligned_be16()
[all …]
/tools/perf/ui/
Dprogress.c4 static void null_progress__update(struct ui_progress *p __maybe_unused) in null_progress__update()
15 void ui_progress__update(struct ui_progress *p, u64 adv) in ui_progress__update() argument
17 p->curr += adv; in ui_progress__update()
19 if (p->curr >= p->next) { in ui_progress__update()
20 p->next += p->step; in ui_progress__update()
21 ui_progress__ops->update(p); in ui_progress__update()
25 void ui_progress__init(struct ui_progress *p, u64 total, const char *title) in ui_progress__init() argument
27 p->curr = 0; in ui_progress__init()
28 p->next = p->step = total / 16; in ui_progress__init()
29 p->total = total; in ui_progress__init()
[all …]
/tools/lib/traceevent/
Dplugin_scsi.c152 scsi_trace_rw6(struct trace_seq *p, unsigned char *cdb, int len) in scsi_trace_rw6() argument
154 const char *ret = p->buffer + p->len; in scsi_trace_rw6()
162 trace_seq_printf(p, "lba=%llu txlen=%llu", in scsi_trace_rw6()
164 trace_seq_putc(p, 0); in scsi_trace_rw6()
169 scsi_trace_rw10(struct trace_seq *p, unsigned char *cdb, int len) in scsi_trace_rw10() argument
171 const char *ret = p->buffer + p->len; in scsi_trace_rw10()
181 trace_seq_printf(p, "lba=%llu txlen=%llu protect=%u", in scsi_trace_rw10()
186 trace_seq_printf(p, " unmap=%u", cdb[1] >> 3 & 1); in scsi_trace_rw10()
188 trace_seq_putc(p, 0); in scsi_trace_rw10()
193 scsi_trace_rw12(struct trace_seq *p, unsigned char *cdb, int len) in scsi_trace_rw12() argument
[all …]
/tools/perf/bench/
Dnuma.c36 #define tprintf(x...) do { if (g && g->p.show_details >= 0) printf(x); } while (0)
41 #define dprintf(x...) do { if (g && g->p.show_details >= 1) printf(x); } while (0)
143 struct params p; member
219 for (cpu = 0; cpu < g->p.nr_cpus; cpu++) in bind_to_cpu()
222 BUG_ON(target_cpu < 0 || target_cpu >= g->p.nr_cpus); in bind_to_cpu()
234 int cpus_per_node = g->p.nr_cpus/g->p.nr_nodes; in bind_to_node()
239 BUG_ON(cpus_per_node*g->p.nr_nodes != g->p.nr_cpus); in bind_to_node()
248 for (cpu = 0; cpu < g->p.nr_cpus; cpu++) in bind_to_node()
254 BUG_ON(cpu_stop > g->p.nr_cpus); in bind_to_node()
278 ret = set_mempolicy(MPOL_DEFAULT, NULL, g->p.nr_nodes-1); in mempol_restore()
[all …]
/tools/virtio/linux/
Dkernel.h31 #define virt_to_phys(p) ((unsigned long)p) argument
34 #define page_to_phys(p) ((dma_addr_t)(unsigned long)(p)) argument
35 #define virt_to_page(p) ((struct page *)((unsigned long)p & PAGE_MASK)) argument
37 #define offset_in_page(p) (((unsigned long)p) % PAGE_SIZE) argument
51 static inline void kfree(void *p) in kfree() argument
53 if (p >= __kfree_ignore_start && p < __kfree_ignore_end) in kfree()
55 free(p); in kfree()
58 static inline void *krealloc(void *p, size_t s, gfp_t gfp) in krealloc() argument
60 return realloc(p, s); in krealloc()
66 void *p; in __get_free_page() local
[all …]
/tools/usb/usbip/libsrc/
Dnames.c114 struct product *p; in names_product() local
116 p = products[hashnum((vendorid << 16) | productid)]; in names_product()
117 for (; p; p = p->next) in names_product()
118 if (p->vendorid == vendorid && p->productid == productid) in names_product()
119 return p->name; in names_product()
148 struct protocol *p; in names_protocol() local
150 p = protocols[hashnum((classid << 16) | (subclassid << 8) in names_protocol()
152 for (; p; p = p->next) in names_protocol()
153 if (p->classid == classid && p->subclassid == subclassid && in names_protocol()
154 p->protocolid == protocolid) in names_protocol()
[all …]
/tools/testing/selftests/powerpc/pmu/ebb/
Dtrace.c38 static bool trace_check_bounds(struct trace_buffer *tb, void *p) in trace_check_bounds() argument
40 return p < ((void *)tb + tb->size); in trace_check_bounds()
43 static bool trace_check_alloc(struct trace_buffer *tb, void *p) in trace_check_alloc() argument
54 if (!trace_check_bounds(tb, p)) { in trace_check_alloc()
64 void *p, *newtail; in trace_alloc() local
66 p = tb->tail; in trace_alloc()
73 return p; in trace_alloc()
90 u64 *p; in trace_log_reg() local
97 p = (u64 *)e->data; in trace_log_reg()
98 *p++ = reg; in trace_log_reg()
[all …]
/tools/perf/util/
Dstring.c13 char *p; in perf_atoll() local
19 length = strtoll(str, &p, 10); in perf_atoll()
20 switch (c = *p++) { in perf_atoll()
22 if (*p) in perf_atoll()
44 if (strcmp(p, "b") != 0) in perf_atoll()
47 if (strcmp(p, "B") != 0) in perf_atoll()
99 char **p; in argv_free() local
100 for (p = argv; *p; p++) in argv_free()
101 zfree(p); in argv_free()
136 const char *p = str; in argv_split() local
[all …]
Drblist.c16 struct rb_node **p = &rblist->entries.rb_node; in rblist__add_node() local
19 while (*p != NULL) { in rblist__add_node()
22 parent = *p; in rblist__add_node()
26 p = &(*p)->rb_left; in rblist__add_node()
28 p = &(*p)->rb_right; in rblist__add_node()
37 rb_link_node(new_node, parent, p); in rblist__add_node()
55 struct rb_node **p = &rblist->entries.rb_node; in __rblist__findnew() local
58 while (*p != NULL) { in __rblist__findnew()
61 parent = *p; in __rblist__findnew()
65 p = &(*p)->rb_left; in __rblist__findnew()
[all …]
Dstrfilter.c16 if (node->p && !is_operator(*node->p)) in strfilter_node__delete()
17 zfree((char **)&node->p); in strfilter_node__delete()
34 const char *p; in get_token() local
40 p = s; in get_token()
44 p = s + 1; in get_token()
48 while (*p && !is_separator(*p) && !isspace(*p)) in get_token()
49 p++; in get_token()
51 if (*(p - 1) == '\\' || (*p == '!' && *(p - 1) == '[')) { in get_token()
52 p++; in get_token()
57 *e = p; in get_token()
[all …]
Dparse-options.c18 static int get_arg(struct parse_opt_ctx_t *p, const struct option *opt, in get_arg() argument
21 if (p->opt) { in get_arg()
22 *arg = p->opt; in get_arg()
23 p->opt = NULL; in get_arg()
24 } else if ((opt->flags & PARSE_OPT_LASTARG_DEFAULT) && (p->argc == 1 || in get_arg()
25 **(p->argv + 1) == '-')) { in get_arg()
27 } else if (p->argc > 1) { in get_arg()
28 p->argc--; in get_arg()
29 *arg = *++p->argv; in get_arg()
35 static int get_value(struct parse_opt_ctx_t *p, in get_value() argument
[all …]
Dcomm.c48 struct rb_node **p = &root->rb_node; in comm_str__findnew() local
53 while (*p != NULL) { in comm_str__findnew()
54 parent = *p; in comm_str__findnew()
62 p = &(*p)->rb_left; in comm_str__findnew()
64 p = &(*p)->rb_right; in comm_str__findnew()
71 rb_link_node(&new->rb_node, parent, p); in comm_str__findnew()
/tools/perf/
Dbuiltin-timechart.c215 struct per_pid *p; in pid_set_comm() local
217 p = find_create_pid(tchart, pid); in pid_set_comm()
218 c = p->all; in pid_set_comm()
221 p->current = c; in pid_set_comm()
226 p->current = c; in pid_set_comm()
234 p->current = c; in pid_set_comm()
235 c->next = p->all; in pid_set_comm()
236 p->all = c; in pid_set_comm()
241 struct per_pid *p, *pp; in pid_fork() local
242 p = find_create_pid(tchart, pid); in pid_fork()
[all …]
Dbuiltin-buildid-cache.c30 char *p; in build_id_cache__kcore_buildid() local
34 p = strrchr(root_dir, '/'); in build_id_cache__kcore_buildid()
35 if (!p) in build_id_cache__kcore_buildid()
37 *p = '\0'; in build_id_cache__kcore_buildid()
133 char *p; in build_id_cache__add_kcore() local
137 p = strrchr(from_dir, '/'); in build_id_cache__add_kcore()
138 if (!p || strcmp(p + 1, "kcore")) in build_id_cache__add_kcore()
140 *p = '\0'; in build_id_cache__add_kcore()
166 p = strrchr(to_dir, '/'); in build_id_cache__add_kcore()
167 if (p) in build_id_cache__add_kcore()
[all …]
/tools/power/cpupower/debug/i386/
Ddump_psb.c61 decode_pst(char *p, int npstates) in decode_pst() argument
67 fid = *p++; in decode_pst()
68 vid = *p++; in decode_pst()
82 void decode_psb(char *p, int numpst) in decode_psb() argument
88 psb = (struct psb_header*) p; in decode_psb()
104 p = ((char *) psb) + sizeof(struct psb_header); in decode_psb()
112 pst = (struct pst_header*) p; in decode_psb()
128 decode_pst(p + sizeof(struct pst_header), pst->numpstates); in decode_psb()
131 p += sizeof(struct pst_header) + 2*pst->numpstates; in decode_psb()
155 char *p; in main() local
[all …]
/tools/testing/selftests/powerpc/mm/
Dhugetlb_vs_thp_test.c13 char *p; in test_body() local
17 p = mmap(addr, SIZE, PROT_READ | PROT_WRITE, in test_body()
19 if (p != MAP_FAILED) { in test_body()
29 p = mmap(addr, SIZE, PROT_READ | PROT_WRITE, in test_body()
31 if (p == MAP_FAILED) { in test_body()
50 *p = 0xf; in test_body()
/tools/testing/selftests/memfd/
Dfuse_test.c126 void *p; in mfd_assert_mmap_shared() local
128 p = mmap(NULL, in mfd_assert_mmap_shared()
134 if (p == MAP_FAILED) { in mfd_assert_mmap_shared()
139 return p; in mfd_assert_mmap_shared()
144 void *p; in mfd_assert_mmap_private() local
146 p = mmap(NULL, in mfd_assert_mmap_private()
152 if (p == MAP_FAILED) { in mfd_assert_mmap_private()
157 return p; in mfd_assert_mmap_private()
232 void *p; in main() local
255 p = mfd_assert_mmap_shared(mfd); in main()
[all …]
Dmemfd_test.c149 void *p; in mfd_assert_mmap_shared() local
151 p = mmap(NULL, in mfd_assert_mmap_shared()
157 if (p == MAP_FAILED) { in mfd_assert_mmap_shared()
162 return p; in mfd_assert_mmap_shared()
167 void *p; in mfd_assert_mmap_private() local
169 p = mmap(NULL, in mfd_assert_mmap_private()
175 if (p == MAP_FAILED) { in mfd_assert_mmap_private()
180 return p; in mfd_assert_mmap_private()
214 void *p; in mfd_assert_read() local
224 p = mmap(NULL, in mfd_assert_read()
[all …]
/tools/hv/
Dhv_kvp_daemon.c423 char *p, buf[512]; in kvp_get_os_info() local
437 p = strchr(os_version, '-'); in kvp_get_os_info()
438 if (p) in kvp_get_os_info()
439 *p = '\0'; in kvp_get_os_info()
455 p = strchr(buf, '='); in kvp_get_os_info()
456 if (!p) in kvp_get_os_info()
458 *p++ = 0; in kvp_get_os_info()
461 value = p; in kvp_get_os_info()
462 q = p; in kvp_get_os_info()
463 while (*p) { in kvp_get_os_info()
[all …]
/tools/perf/ui/gtk/
Dprogress.c10 static void gtk_ui_progress__update(struct ui_progress *p) in gtk_ui_progress__update() argument
12 double fraction = p->total ? 1.0 * p->curr / p->total : 0.0; in gtk_ui_progress__update()
17 GtkWidget *label = gtk_label_new(p->title); in gtk_ui_progress__update()
35 snprintf(buf, sizeof(buf), "%"PRIu64" / %"PRIu64, p->curr, p->total); in gtk_ui_progress__update()
/tools/testing/selftests/powerpc/pmu/
Dl3_bank_test.c20 char *p; in l3_bank_test() local
23 p = malloc(MALLOC_SIZE); in l3_bank_test()
24 FAIL_IF(!p); in l3_bank_test()
31 p[i] = i; in l3_bank_test()
40 free(p); in l3_bank_test()
/tools/perf/ui/tui/
Dprogress.c8 static void tui_progress__update(struct ui_progress *p) in tui_progress__update() argument
18 if (p->total == 0) in tui_progress__update()
27 SLsmg_write_string((char *)p->title); in tui_progress__update()
30 bar = ((SLtt_Screen_Cols - 2) * p->curr) / p->total; in tui_progress__update()
/tools/power/x86/turbostat/
Dturbostat.c216 struct pkg_data *p; in for_all_cpus() local
224 p = GET_PKG(pkg_base, pkg_no); in for_all_cpus()
226 retval = func(t, c, p); in for_all_cpus()
360 struct pkg_data *p) in dump_counters() argument
362 outp += sprintf(outp, "t %p, c %p, p %p\n", t, c, p); in dump_counters()
391 if (p) { in dump_counters()
392 outp += sprintf(outp, "package: %d\n", p->package_id); in dump_counters()
393 outp += sprintf(outp, "pc2: %016llX\n", p->pc2); in dump_counters()
394 outp += sprintf(outp, "pc3: %016llX\n", p->pc3); in dump_counters()
395 outp += sprintf(outp, "pc6: %016llX\n", p->pc6); in dump_counters()
[all …]
/tools/lib/lockdep/uinclude/linux/
Dirqflags.h4 # define trace_hardirq_context(p) 0 argument
5 # define trace_softirq_context(p) 0 argument
6 # define trace_hardirqs_enabled(p) 0 argument
7 # define trace_softirqs_enabled(p) 0 argument

12345