Home
last modified time | relevance | path

Searched refs:value (Results 1 – 25 of 176) sorted by relevance

12345678

/tools/perf/util/
Dunits.c18 unsigned long int value; in parse_tag_value() local
21 value = strtoul(str, &endptr, 10); in parse_tag_value()
25 if (value > ULONG_MAX / i->mult) in parse_tag_value()
27 value *= i->mult; in parse_tag_value()
28 return value; in parse_tag_value()
36 unsigned long convert_unit(unsigned long value, char *unit) in convert_unit() argument
40 if (value > 1000) { in convert_unit()
41 value /= 1000; in convert_unit()
45 if (value > 1000) { in convert_unit()
46 value /= 1000; in convert_unit()
[all …]
Dconfig.c70 static char value[1024]; in parse_value() local
77 if (len >= sizeof(value) - 1) in parse_value()
82 value[len] = 0; in parse_value()
83 return value; in parse_value()
99 value[len++] = ' '; in parse_value()
123 value[len++] = c; in parse_value()
130 value[len++] = c; in parse_value()
142 char *value; in get_value() local
159 value = NULL; in get_value()
163 value = parse_value(); in get_value()
[all …]
Dvalues.c16 values->value = zalloc(values->threads_max * sizeof(*values->value)); in perf_read_values_init()
17 if (!values->pid || !values->tid || !values->value) { in perf_read_values_init()
42 zfree(&values->value); in perf_read_values_init()
54 zfree(&values->value[i]); in perf_read_values_destroy()
55 zfree(&values->value); in perf_read_values_destroy()
69 *nvalue = realloc(values->value, nthreads_max * sizeof(*values->value)); in perf_read_values__enlarge_threads()
77 values->value = nvalue; in perf_read_values__enlarge_threads()
104 values->value[i] = zalloc(values->counters_max * sizeof(**values->value)); in perf_read_values__findnew_thread()
105 if (!values->value[i]) { in perf_read_values__findnew_thread()
134 u64 *value = realloc(values->value[i], counters_max * sizeof(**values->value)); in perf_read_values__enlarge_counters() local
[all …]
Dcolor.c13 int perf_config_colorbool(const char *var, const char *value, int stdout_is_tty) in perf_config_colorbool() argument
15 if (value) { in perf_config_colorbool()
16 if (!strcasecmp(value, "never")) in perf_config_colorbool()
18 if (!strcasecmp(value, "always")) in perf_config_colorbool()
20 if (!strcasecmp(value, "auto")) in perf_config_colorbool()
25 if (!perf_config_bool(var, value)) in perf_config_colorbool()
40 int perf_color_default_config(const char *var, const char *value, in perf_color_default_config() argument
44 perf_use_color_default = perf_config_colorbool(var, value, -1); in perf_color_default_config()
191 int value_color_snprintf(char *bf, size_t size, const char *fmt, double value) in value_color_snprintf() argument
193 const char *color = get_percent_color(value); in value_color_snprintf()
[all …]
/tools/testing/selftests/bpf/
Dtest_lru_map.c99 unsigned long long key, value[nr_cpus]; in test_lru_sanity0() local
117 value[0] = 1234; in test_lru_sanity0()
122 assert(!bpf_map_update_elem(lru_map_fd, &key, value, BPF_NOEXIST)); in test_lru_sanity0()
123 assert(!bpf_map_update_elem(expected_map_fd, &key, value, in test_lru_sanity0()
127 assert(bpf_map_update_elem(lru_map_fd, &key, value, BPF_NOEXIST) == -1 in test_lru_sanity0()
131 assert(bpf_map_update_elem(lru_map_fd, &key, value, -1) == -1 && in test_lru_sanity0()
138 assert(bpf_map_lookup_elem(lru_map_fd, &key, value) == -1 && in test_lru_sanity0()
142 assert(bpf_map_update_elem(lru_map_fd, &key, value, BPF_EXIST) == -1 && in test_lru_sanity0()
146 assert(!bpf_map_update_elem(lru_map_fd, &key, value, BPF_NOEXIST)); in test_lru_sanity0()
152 assert(bpf_map_lookup_elem(lru_map_fd, &key, value) == -1 && in test_lru_sanity0()
[all …]
Dtest_lpm_map.c165 uint8_t *data, *value; in test_lpm_map() local
180 value = alloca(keysize + 1); in test_lpm_map()
181 memset(value, 0, keysize + 1); in test_lpm_map()
195 value[j] = rand() & 0xff; in test_lpm_map()
196 value[keysize] = rand() % (8 * keysize + 1); in test_lpm_map()
198 list = tlpm_add(list, value, value[keysize]); in test_lpm_map()
200 key->prefixlen = value[keysize]; in test_lpm_map()
201 memcpy(key->data, value, keysize); in test_lpm_map()
202 r = bpf_map_update_elem(map, key, value, 0); in test_lpm_map()
214 r = bpf_map_lookup_elem(map, key, value); in test_lpm_map()
[all …]
Dtest_maps.c32 long long key, next_key, first_key, value; in test_hashmap() local
35 fd = bpf_create_map(BPF_MAP_TYPE_HASH, sizeof(key), sizeof(value), in test_hashmap()
43 value = 1234; in test_hashmap()
45 assert(bpf_map_update_elem(fd, &key, &value, BPF_ANY) == 0); in test_hashmap()
47 value = 0; in test_hashmap()
49 assert(bpf_map_update_elem(fd, &key, &value, BPF_NOEXIST) == -1 && in test_hashmap()
54 assert(bpf_map_update_elem(fd, &key, &value, -1) == -1 && in test_hashmap()
58 assert(bpf_map_lookup_elem(fd, &key, &value) == 0 && value == 1234); in test_hashmap()
62 assert(bpf_map_lookup_elem(fd, &key, &value) == -1 && errno == ENOENT); in test_hashmap()
65 assert(bpf_map_update_elem(fd, &key, &value, BPF_EXIST) == -1 && in test_hashmap()
[all …]
/tools/perf/
Dbuiltin-config.c39 const char *var, const char *value) in set_config() argument
53 perf_config_set__collect(set, file_name, var, value); in set_config()
65 if (item->value) in set_config()
67 item->name, item->value); in set_config()
91 char *value = item->value; in show_spec_config() local
93 if (value) { in show_spec_config()
94 printf("%s=%s\n", var, value); in show_spec_config()
114 char *value = item->value; in show_config() local
116 if (value) in show_config()
118 item->name, value); in show_config()
[all …]
Dbuiltin-help.c204 const char *value) in do_add_man_viewer_info() argument
209 new->info = strdup(value); in do_add_man_viewer_info()
222 const char *value) in add_man_viewer_path() argument
225 do_add_man_viewer_info(name, len, value); in add_man_viewer_path()
234 const char *value) in add_man_viewer_cmd() argument
239 do_add_man_viewer_info(name, len, value); in add_man_viewer_cmd()
244 static int add_man_viewer_info(const char *var, const char *value) in add_man_viewer_info() argument
255 if (!value) in add_man_viewer_info()
257 return add_man_viewer_path(name, subkey - name, value); in add_man_viewer_info()
260 if (!value) in add_man_viewer_info()
[all …]
/tools/testing/selftests/networking/timestamping/
Dhwtstamp_config.c22 int value; in lookup_value() local
24 for (value = 0; value < size; value++) in lookup_value()
25 if (names[value] && strcasecmp(names[value], name) == 0) in lookup_value()
26 return value; in lookup_value()
32 lookup_name(const char **names, int size, int value) in lookup_name() argument
34 return (value >= 0 && value < size) ? names[value] : NULL; in lookup_name()
39 int value; in list_names() local
41 for (value = 0; value < size; value++) in list_names()
42 if (names[value]) in list_names()
43 fprintf(f, " %s\n", names[value]); in list_names()
/tools/perf/scripts/perl/Perf-Trace-Util/lib/Perf/Trace/
DCore.pm33 my ($value) = @_;
40 if (!$value && !$idx) {
45 if ($idx && ($value & $idx) == $idx) {
51 $value &= ~$idx;
63 my ($event_name, $field_name, $value) = @_;
70 if (!$value && !$idx) {
74 if ($idx && ($value & $idx) == $idx) {
80 $value &= ~$idx;
97 my ($event_name, $field_name, $value, $field_str) = @_;
99 $flag_fields{$event_name}{$field_name}{"values"}{$value} = $field_str;
[all …]
/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/
DCore.py20 def define_flag_value(event_name, field_name, value, field_str): argument
21 flag_fields[event_name][field_name]['values'][value] = field_str
27 def define_symbolic_value(event_name, field_name, value, field_str): argument
28 symbolic_fields[event_name][field_name]['values'][value] = field_str
30 def flag_str(event_name, field_name, value): argument
38 if not value and not idx:
41 if idx and (value & idx) == idx:
46 value &= ~idx
50 def symbol_str(event_name, field_name, value): argument
57 if not value and not idx:
[all …]
DUtil.py35 def add_stats(dict, key, value): argument
37 dict[key] = (value, value, value, 1)
40 if value < min:
41 min = value
42 if value > max:
43 max = value
44 avg = (avg + value) / 2
/tools/lib/api/fs/
Dfs.h31 int filename__read_int(const char *filename, int *value);
32 int filename__read_ull(const char *filename, unsigned long long *value);
35 int filename__write_int(const char *filename, int value);
39 int sysctl__read_int(const char *sysctl, int *value);
40 int sysfs__read_int(const char *entry, int *value);
41 int sysfs__read_ull(const char *entry, unsigned long long *value);
43 int sysfs__read_bool(const char *entry, bool *value);
45 int sysfs__write_int(const char *entry, int value);
Dfs.c303 int filename__read_int(const char *filename, int *value) in filename__read_int() argument
312 *value = atoi(line); in filename__read_int()
325 int filename__read_ull(const char *filename, unsigned long long *value) in filename__read_ull() argument
334 *value = strtoull(line, NULL, 0); in filename__read_ull()
335 if (*value != ULLONG_MAX) in filename__read_ull()
393 int filename__write_int(const char *filename, int value) in filename__write_int() argument
401 sprintf(buf, "%d", value); in filename__write_int()
422 int sysfs__read_ull(const char *entry, unsigned long long *value) in sysfs__read_ull() argument
432 return filename__read_ull(path, value); in sysfs__read_ull()
435 int sysfs__read_int(const char *entry, int *value) in sysfs__read_int() argument
[all …]
/tools/testing/fault-injection/
Dfailcmd.sh27 Default value is 1
29 -t value
30 --times=value
32 Default value is 1
34 --oom-kill-allocating-task=value
35 set /proc/sys/vm/oom_kill_allocating_task to specified value
37 Default value is 1
42 --interval=value, --space=value, --verbose=value, --task-filter=value,
43 --stacktrace-depth=value, --require-start=value, --require-end=value,
44 --reject-start=value, --reject-end=value, --ignore-gfp-wait=value
[all …]
/tools/power/cpupower/utils/helpers/
Dcpuid.c49 char value[64]; in get_cpu_info() local
67 if (!fgets(value, 64, fp)) in get_cpu_info()
69 value[63 - 1] = '\0'; in get_cpu_info()
71 if (!strncmp(value, "processor\t: ", 12)) in get_cpu_info()
72 sscanf(value, "processor\t: %u", &proc); in get_cpu_info()
78 if (!strncmp(value, "vendor_id", 9)) { in get_cpu_info()
80 if (strstr(value, cpu_vendor_table[x])) in get_cpu_info()
84 } else if (!strncmp(value, "cpu family\t: ", 13)) { in get_cpu_info()
85 sscanf(value, "cpu family\t: %u", in get_cpu_info()
87 } else if (!strncmp(value, "model\t\t: ", 9)) { in get_cpu_info()
[all …]
/tools/lib/subcmd/
Dparse-options.h104 void *value; member
123 …v, h, b) { .type = OPTION_BIT, .short_name = (s), .long_name = (l), .value = check_vtype(v, i…
124 …v, h) { .type = OPTION_BOOLEAN, .short_name = (s), .long_name = (l), .value = check_vtype(v, b…
125 …h, f) { .type = OPTION_BOOLEAN, .short_name = (s), .long_name = (l), .value = check_vtype(v, b…
128 .value = check_vtype(v, bool *), .help = (h), \
130 …v, h) { .type = OPTION_INCR, .short_name = (s), .long_name = (l), .value = check_vtype(v, i…
131 …, h, i) { .type = OPTION_SET_UINT, .short_name = (s), .long_name = (l), .value = check_vtype(v, u…
132 …v, h, p) { .type = OPTION_SET_PTR, .short_name = (s), .long_name = (l), .value = (v), .help = (h)…
133 …v, h) { .type = OPTION_INTEGER, .short_name = (s), .long_name = (l), .value = check_vtype(v, i…
134 …v, h) { .type = OPTION_UINTEGER, .short_name = (s), .long_name = (l), .value = check_vtype(v, u…
[all …]
/tools/objtool/arch/x86/lib/
Dinsn.c139 insn->rex_prefix.value = b; in insn_get_prefixes()
277 modrm->value = mod; in insn_get_modrm()
316 return (modrm->nbytes && (modrm->value & 0xc7) == 0x5); in insn_rip_relative()
335 modrm = (insn_byte_t)insn->modrm.value; in insn_get_sib()
338 insn->sib.value = get_next(insn_byte_t, insn); in insn_get_sib()
383 mod = X86_MODRM_MOD(insn->modrm.value); in insn_get_displacement()
384 rm = X86_MODRM_RM(insn->modrm.value); in insn_get_displacement()
385 base = X86_SIB_BASE(insn->sib.value); in insn_get_displacement()
389 insn->displacement.value = get_next(signed char, insn); in insn_get_displacement()
393 insn->displacement.value = in insn_get_displacement()
[all …]
/tools/perf/util/intel-pt-decoder/
Dinsn.c139 insn->rex_prefix.value = b; in insn_get_prefixes()
277 modrm->value = mod; in insn_get_modrm()
316 return (modrm->nbytes && (modrm->value & 0xc7) == 0x5); in insn_rip_relative()
335 modrm = (insn_byte_t)insn->modrm.value; in insn_get_sib()
338 insn->sib.value = get_next(insn_byte_t, insn); in insn_get_sib()
383 mod = X86_MODRM_MOD(insn->modrm.value); in insn_get_displacement()
384 rm = X86_MODRM_RM(insn->modrm.value); in insn_get_displacement()
385 base = X86_SIB_BASE(insn->sib.value); in insn_get_displacement()
389 insn->displacement.value = get_next(signed char, insn); in insn_get_displacement()
393 insn->displacement.value = in insn_get_displacement()
[all …]
/tools/testing/selftests/powerpc/pmu/ebb/
Dtrace.c87 int trace_log_reg(struct trace_buffer *tb, u64 reg, u64 value) in trace_log_reg() argument
92 e = trace_alloc_entry(tb, sizeof(reg) + sizeof(value)); in trace_log_reg()
99 *p++ = value; in trace_log_reg()
104 int trace_log_counter(struct trace_buffer *tb, u64 value) in trace_log_counter() argument
109 e = trace_alloc_entry(tb, sizeof(value)); in trace_log_counter()
115 *p++ = value; in trace_log_counter()
202 u64 *p, *reg, *value; in trace_print_reg() local
207 value = p; in trace_print_reg()
211 printf("register %-10s = 0x%016llx\n", name, *value); in trace_print_reg()
213 printf("register %lld = 0x%016llx\n", *reg, *value); in trace_print_reg()
[all …]
Debb.c184 static char *decode_mmcr0(u32 value) in decode_mmcr0() argument
190 if (value & (1 << 31)) in decode_mmcr0()
192 if (value & (1 << 26)) in decode_mmcr0()
194 if (value & (1 << 7)) in decode_mmcr0()
200 static char *decode_bescr(u64 value) in decode_bescr() argument
206 if (value & (1ull << 63)) in decode_bescr()
208 if (value & (1ull << 32)) in decode_bescr()
210 if (value & 1) in decode_bescr()
442 void write_pmc(int pmc, u64 value) in write_pmc() argument
445 case 1: mtspr(SPRN_PMC1, value); break; in write_pmc()
[all …]
Dinstruction_count_test.c45 event->result.value = ebb_state.stats.pmc_count[4-1]; in do_count_loop()
47 difference = event->result.value - expected; in do_count_loop()
48 percentage = (double)difference / event->result.value * 100; in do_count_loop()
53 printf("Actual %llu\n", event->result.value); in do_count_loop()
63 if (difference / event->result.value) in do_count_loop()
76 overhead = event->result.value; in determine_overhead()
80 current = event->result.value; in determine_overhead()
/tools/perf/scripts/python/
Dexport-to-postgresql.py675 value = struct.pack(fmt, 2, 8, evsel_id, n, evsel_name)
676 evsel_file.write(value)
681 value = struct.pack(fmt, 3, 8, machine_id, 4, pid, n, root_dir)
682 machine_file.write(value)
685 value = struct.pack("!hiqiqiqiiii", 5, 8, thread_id, 8, machine_id, 8, process_id, 4, pid, 4, tid)
686 thread_file.write(value)
691 value = struct.pack(fmt, 2, 8, comm_id, n, comm_str)
692 comm_file.write(value)
696 value = struct.pack(fmt, 3, 8, comm_thread_id, 8, comm_id, 8, thread_id)
697 comm_thread_file.write(value)
[all …]
/tools/virtio/virtio-trace/
Dtrace-agent.c74 unsigned long value, round; in parse_size() local
77 value = strtoul(arg, &ptr, 10); in parse_size()
80 value <<= 10; in parse_size()
83 value <<= 20; in parse_size()
89 if (value > PIPE_MAX_SIZE) { in parse_size()
92 } else if (value < PIPE_MIN_SIZE) { in parse_size()
98 round = value & (PAGE_SIZE - 1); in parse_size()
99 value = value - round; in parse_size()
101 return value; in parse_size()

12345678