Home
last modified time | relevance | path

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

12345678910>>...16

/tools/testing/selftests/kvm/include/
Devmcs.h251 static inline int evmcs_vmptrst(uint64_t *value) in evmcs_vmptrst() argument
253 *value = current_vp_assist->current_nested_vmcs & in evmcs_vmptrst()
259 static inline int evmcs_vmread(uint64_t encoding, uint64_t *value) in evmcs_vmread() argument
263 *value = current_evmcs->guest_rip; in evmcs_vmread()
266 *value = current_evmcs->guest_rsp; in evmcs_vmread()
269 *value = current_evmcs->guest_rflags; in evmcs_vmread()
272 *value = current_evmcs->host_ia32_pat; in evmcs_vmread()
275 *value = current_evmcs->host_ia32_efer; in evmcs_vmread()
278 *value = current_evmcs->host_cr0; in evmcs_vmread()
281 *value = current_evmcs->host_cr3; in evmcs_vmread()
[all …]
/tools/power/x86/intel-speed-select/
Disst-display.c85 char *value) in format_and_print_txt() argument
102 if (header && value) { in format_and_print_txt()
104 fprintf(outf, "%s:%s\n", header, value); in format_and_print_txt()
112 static void format_and_print(FILE *outf, int level, char *header, char *value) in format_and_print() argument
119 format_and_print_txt(outf, level, header, value); in format_and_print()
139 if (value) { in format_and_print()
144 fprintf(outf, "\"%s\"", value); in format_and_print()
196 char value[512]; in _isst_pbf_display_information() local
202 snprintf(value, sizeof(value), "%d", in _isst_pbf_display_information()
204 format_and_print(outf, disp_level + 1, header, value); in _isst_pbf_display_information()
[all …]
/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.c75 static char value[1024]; in parse_value() local
82 if (len >= sizeof(value) - 1) in parse_value()
87 value[len] = 0; in parse_value()
88 return value; in parse_value()
104 value[len++] = ' '; in parse_value()
128 value[len++] = c; in parse_value()
135 value[len++] = c; in parse_value()
147 char *value; in get_value() local
164 value = NULL; in get_value()
168 value = parse_value(); in get_value()
[all …]
Dcolor_config.c12 int perf_config_colorbool(const char *var, const char *value, int stdout_is_tty) in perf_config_colorbool() argument
14 if (value) { in perf_config_colorbool()
15 if (!strcasecmp(value, "never")) in perf_config_colorbool()
17 if (!strcasecmp(value, "always")) in perf_config_colorbool()
19 if (!strcasecmp(value, "auto")) in perf_config_colorbool()
24 if (!perf_config_bool(var, value)) in perf_config_colorbool()
39 int perf_color_default_config(const char *var, const char *value, in perf_color_default_config() argument
43 perf_use_color_default = perf_config_colorbool(var, value, -1); in perf_color_default_config()
Dvalues.c17 values->value = zalloc(values->threads_max * sizeof(*values->value)); in perf_read_values_init()
18 if (!values->pid || !values->tid || !values->value) { in perf_read_values_init()
43 zfree(&values->value); in perf_read_values_init()
55 zfree(&values->value[i]); in perf_read_values_destroy()
56 zfree(&values->value); in perf_read_values_destroy()
70 *nvalue = realloc(values->value, nthreads_max * sizeof(*values->value)); in perf_read_values__enlarge_threads()
78 values->value = nvalue; in perf_read_values__enlarge_threads()
105 values->value[i] = zalloc(values->counters_max * sizeof(**values->value)); in perf_read_values__findnew_thread()
106 if (!values->value[i]) { in perf_read_values__findnew_thread()
135 u64 *value = realloc(values->value[i], counters_max * sizeof(**values->value)); in perf_read_values__enlarge_counters() local
[all …]
/tools/testing/selftests/bpf/
Dtest_lru_map.c43 void *value) in bpf_map_lookup_elem_with_ref_bit() argument
96 assert(!bpf_map_lookup_elem(mfd, &zero, value)); in bpf_map_lookup_elem_with_ref_bit()
161 unsigned long long key, value[nr_cpus]; in test_lru_sanity0() local
179 value[0] = 1234; in test_lru_sanity0()
184 assert(!bpf_map_update_elem(lru_map_fd, &key, value, BPF_NOEXIST)); in test_lru_sanity0()
185 assert(!bpf_map_update_elem(expected_map_fd, &key, value, in test_lru_sanity0()
189 assert(bpf_map_update_elem(lru_map_fd, &key, value, BPF_NOEXIST) == -1 in test_lru_sanity0()
193 assert(bpf_map_update_elem(lru_map_fd, &key, value, -1) == -1 && in test_lru_sanity0()
200 assert(bpf_map_lookup_elem(lru_map_fd, &key, value) == -1 && in test_lru_sanity0()
204 assert(bpf_map_update_elem(lru_map_fd, &key, value, BPF_EXIST) == -1 && in test_lru_sanity0()
[all …]
Dtest_cgroup_storage.c42 unsigned long long value; in main() local
54 sizeof(value), 0, 0); in main()
61 sizeof(key), sizeof(value), 0, 0); in main()
90 if (bpf_map_lookup_elem(map_fd, &key, &value)) { in main()
109 if (bpf_map_lookup_elem(map_fd, &key, &value)) { in main()
114 if (value != 3) { in main()
115 printf("Unexpected data in the cgroup storage: %llu\n", value); in main()
120 value++; in main()
121 if (bpf_map_update_elem(map_fd, &key, &value, 0)) { in main()
132 if (bpf_map_lookup_elem(map_fd, &key, &value)) { in main()
[all …]
Dtest_lpm_map.c214 uint8_t *data, *value; in test_lpm_map() local
230 value = alloca(keysize + 1); in test_lpm_map()
231 memset(value, 0, keysize + 1); in test_lpm_map()
245 value[j] = rand() & 0xff; in test_lpm_map()
246 value[keysize] = rand() % (8 * keysize + 1); in test_lpm_map()
248 list = tlpm_add(list, value, value[keysize]); in test_lpm_map()
250 key->prefixlen = value[keysize]; in test_lpm_map()
251 memcpy(key->data, value, keysize); in test_lpm_map()
252 r = bpf_map_update_elem(map, key, value, 0); in test_lpm_map()
264 r = bpf_map_lookup_elem(map, key, value); in test_lpm_map()
[all …]
Dbench.h50 long value; member
68 static inline void atomic_inc(long *value) in atomic_inc() argument
70 (void)__atomic_add_fetch(value, 1, __ATOMIC_RELAXED); in atomic_inc()
73 static inline void atomic_add(long *value, long n) in atomic_add() argument
75 (void)__atomic_add_fetch(value, n, __ATOMIC_RELAXED); in atomic_add()
78 static inline long atomic_swap(long *value, long n) in atomic_swap() argument
80 return __atomic_exchange_n(value, n, __ATOMIC_RELAXED); in atomic_swap()
Dtest_maps.c39 long long key, next_key, first_key, value; in test_hashmap() local
42 fd = bpf_create_map(BPF_MAP_TYPE_HASH, sizeof(key), sizeof(value), in test_hashmap()
50 value = 1234; in test_hashmap()
52 assert(bpf_map_update_elem(fd, &key, &value, BPF_ANY) == 0); in test_hashmap()
54 value = 0; in test_hashmap()
56 assert(bpf_map_update_elem(fd, &key, &value, BPF_NOEXIST) == -1 && in test_hashmap()
61 assert(bpf_map_update_elem(fd, &key, &value, -1) == -1 && in test_hashmap()
65 assert(bpf_map_lookup_elem(fd, &key, &value) == 0 && value == 1234); in test_hashmap()
69 assert(bpf_map_lookup_elem(fd, &key, &value) == -1 && errno == ENOENT); in test_hashmap()
72 assert(bpf_map_update_elem(fd, &key, &value, BPF_EXIST) == -1 && in test_hashmap()
[all …]
/tools/testing/selftests/net/
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/
Dbuiltin-config.c62 if (item->value) in set_config()
64 item->name, item->value); in set_config()
88 char *value = item->value; in show_spec_config() local
90 if (value) { in show_spec_config()
91 printf("%s=%s\n", var, value); in show_spec_config()
111 char *value = item->value; in show_config() local
113 if (value) in show_config()
115 item->name, value); in show_config()
121 static int parse_config_arg(char *arg, char **var, char **value) in parse_config_arg() argument
138 *value = strchr(arg, '='); in parse_config_arg()
[all …]
/tools/lib/api/fs/
Dfs.h45 int filename__read_int(const char *filename, int *value);
46 int filename__read_ull(const char *filename, unsigned long long *value);
47 int filename__read_xll(const char *filename, unsigned long long *value);
50 int filename__write_int(const char *filename, int value);
54 int sysctl__read_int(const char *sysctl, int *value);
55 int sysfs__read_int(const char *entry, int *value);
56 int sysfs__read_ull(const char *entry, unsigned long long *value);
57 int sysfs__read_xll(const char *entry, unsigned long long *value);
59 int sysfs__read_bool(const char *entry, bool *value);
61 int sysfs__write_int(const char *entry, int value);
Dfs.c320 int filename__read_int(const char *filename, int *value) in filename__read_int() argument
329 *value = atoi(line); in filename__read_int()
338 unsigned long long *value, int base) in filename__read_ull_base() argument
347 *value = strtoull(line, NULL, base); in filename__read_ull_base()
348 if (*value != ULLONG_MAX) in filename__read_ull_base()
360 int filename__read_xll(const char *filename, unsigned long long *value) in filename__read_xll() argument
362 return filename__read_ull_base(filename, value, 16); in filename__read_xll()
370 int filename__read_ull(const char *filename, unsigned long long *value) in filename__read_ull() argument
372 return filename__read_ull_base(filename, value, 0); in filename__read_ull()
425 int filename__write_int(const char *filename, int value) in filename__write_int() argument
[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
36 if not value and not idx:
39 if idx and (value & idx) == idx:
44 value &= ~idx
48 def symbol_str(event_name, field_name, value): argument
53 if not value and not idx:
[all …]
DUtil.py36 def add_stats(dict, key, value): argument
38 dict[key] = (value, value, value, 1)
41 if value < min:
42 min = value
43 if value > max:
44 max = value
45 avg = (avg + value) / 2
/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/testing/selftests/bpf/progs/
Dlsm.c16 __type(value, __u64);
23 __type(value, __u64);
30 __type(value, __u64);
66 __u64 *value; in BPF_PROG() local
74 value = bpf_map_lookup_elem(&array, &key); in BPF_PROG()
75 if (value) in BPF_PROG()
76 *value = 0; in BPF_PROG()
77 value = bpf_map_lookup_elem(&hash, &key); in BPF_PROG()
78 if (value) in BPF_PROG()
79 *value = 0; in BPF_PROG()
[all …]
Dsample_map_ret0.c24 long *value; in func() local
26 value = bpf_map_lookup_elem(&htab, &key); in func()
27 if (!value) in func()
29 value = bpf_map_lookup_elem(&array, &key64); in func()
30 if (!value) in func()
/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/crypto/
Dgen_fips140_testvecs.py41 def is_string_value(value): argument
42 return (value.isascii() and
43 all(c == '\x00' or c.isprintable() for c in str(value, 'ascii')))
45 def format_value(value, is_string): argument
47 return value
49 for byte in value:
53 def print_value(name, value): argument
54 is_string = is_string_value(value)
58 value = str(value, 'ascii').rstrip('\x00')
64 if len(hdr) + (chars_per_byte * len(value)) + 4 <= 80:
[all …]
/tools/testing/selftests/bpf/prog_tests/
Dmap_init.c22 pcpu_map_value_t value[nr_cpus]; in map_populate() local
27 bpf_percpu(value, i) = FILL_VALUE; in map_populate()
30 err = bpf_map_update_elem(map_fd, &key, value, BPF_NOEXIST); in map_populate()
79 map_value_t value) in prog_run_insert_elem() argument
86 bss->inValue = value; in prog_run_insert_elem()
100 static int check_values_one_cpu(pcpu_map_value_t *value, map_value_t expected) in check_values_one_cpu() argument
106 val = bpf_percpu(value, i); in check_values_one_cpu()
131 pcpu_map_value_t value[nr_cpus]; in test_pcpu_map_init() local
153 err = bpf_map_lookup_elem(map_fd, &key, value); in test_pcpu_map_init()
158 check_values_one_cpu(value, TEST_VALUE); in test_pcpu_map_init()
[all …]
Dringbuf_multi.c12 long value; member
24 CHECK(s->value != 333, "sample1_value", "exp %ld, got %ld\n", in process_sample()
25 333L, s->value); in process_sample()
29 CHECK(s->value != 777, "sample2_value", "exp %ld, got %ld\n", in process_sample()
30 777L, s->value); in process_sample()
34 s->seq, s->value); in process_sample()
70 skel->bss->value = 333; in test_ringbuf_multi()
75 skel->bss->value = 555; in test_ringbuf_multi()
79 skel->bss->value = 777; in test_ringbuf_multi()

12345678910>>...16