/tools/perf/util/ |
D | config.c | 59 static char value[1024]; in parse_value() local 66 if (len >= sizeof(value) - 1) in parse_value() 71 value[len] = 0; in parse_value() 72 return value; in parse_value() 88 value[len++] = ' '; in parse_value() 112 value[len++] = c; in parse_value() 119 value[len++] = c; in parse_value() 131 char *value; in get_value() local 148 value = NULL; in get_value() 152 value = parse_value(); in get_value() [all …]
|
D | values.c | 11 values->value = malloc(values->threads_max * sizeof(*values->value)); in perf_read_values_init() 12 if (!values->pid || !values->tid || !values->value) in perf_read_values_init() 34 zfree(&values->value[i]); in perf_read_values_destroy() 35 zfree(&values->value); in perf_read_values_destroy() 51 values->value = realloc(values->value, in perf_read_values__enlarge_threads() 52 values->threads_max * sizeof(*values->value)); in perf_read_values__enlarge_threads() 53 if (!values->pid || !values->tid || !values->value) in perf_read_values__enlarge_threads() 72 values->value[i] = malloc(values->counters_max * sizeof(**values->value)); in perf_read_values__findnew_thread() 73 if (!values->value[i]) in perf_read_values__findnew_thread() 92 values->value[i] = realloc(values->value[i], in perf_read_values__enlarge_counters() [all …]
|
D | parse-options.h | 96 void *value; member 112 …v, h, b) { .type = OPTION_BIT, .short_name = (s), .long_name = (l), .value = check_vtype(v, i… 113 …v, h) { .type = OPTION_BOOLEAN, .short_name = (s), .long_name = (l), .value = check_vtype(v, b… 114 …h, f) { .type = OPTION_BOOLEAN, .short_name = (s), .long_name = (l), .value = check_vtype(v, b… 117 .value = check_vtype(v, bool *), .help = (h), \ 119 …v, h) { .type = OPTION_INCR, .short_name = (s), .long_name = (l), .value = check_vtype(v, i… 120 …, h, i) { .type = OPTION_SET_UINT, .short_name = (s), .long_name = (l), .value = check_vtype(v, u… 121 …v, h, p) { .type = OPTION_SET_PTR, .short_name = (s), .long_name = (l), .value = (v), .help = (h)… 122 …v, h) { .type = OPTION_INTEGER, .short_name = (s), .long_name = (l), .value = check_vtype(v, i… 123 …v, h) { .type = OPTION_UINTEGER, .short_name = (s), .long_name = (l), .value = check_vtype(v, u… [all …]
|
D | color.c | 8 int perf_config_colorbool(const char *var, const char *value, int stdout_is_tty) in perf_config_colorbool() argument 10 if (value) { in perf_config_colorbool() 11 if (!strcasecmp(value, "never")) in perf_config_colorbool() 13 if (!strcasecmp(value, "always")) in perf_config_colorbool() 15 if (!strcasecmp(value, "auto")) in perf_config_colorbool() 20 if (!perf_config_bool(var, value)) in perf_config_colorbool() 35 int perf_color_default_config(const char *var, const char *value, void *cb) in perf_color_default_config() argument 38 perf_use_color_default = perf_config_colorbool(var, value, -1); in perf_color_default_config() 42 return perf_default_config(var, value, cb); in perf_color_default_config() 185 int value_color_snprintf(char *bf, size_t size, const char *fmt, double value) in value_color_snprintf() argument [all …]
|
D | callchain.c | 33 static int parse_callchain_mode(const char *value) in parse_callchain_mode() argument 35 if (!strncmp(value, "graph", strlen(value))) { in parse_callchain_mode() 39 if (!strncmp(value, "flat", strlen(value))) { in parse_callchain_mode() 43 if (!strncmp(value, "fractal", strlen(value))) { in parse_callchain_mode() 50 static int parse_callchain_order(const char *value) in parse_callchain_order() argument 52 if (!strncmp(value, "caller", strlen(value))) { in parse_callchain_order() 57 if (!strncmp(value, "callee", strlen(value))) { in parse_callchain_order() 65 static int parse_callchain_sort_key(const char *value) in parse_callchain_sort_key() argument 67 if (!strncmp(value, "function", strlen(value))) { in parse_callchain_sort_key() 71 if (!strncmp(value, "address", strlen(value))) { in parse_callchain_sort_key() [all …]
|
D | llvm-utils.c | 29 int perf_llvm_config(const char *var, const char *value) in perf_llvm_config() argument 36 llvm_param.clang_path = strdup(value); in perf_llvm_config() 38 llvm_param.clang_bpf_cmd_template = strdup(value); in perf_llvm_config() 40 llvm_param.clang_opt = strdup(value); in perf_llvm_config() 42 llvm_param.kbuild_dir = strdup(value); in perf_llvm_config() 44 llvm_param.kbuild_opts = strdup(value); in perf_llvm_config() 179 force_set_env(const char *var, const char *value) in force_set_env() argument 181 if (value) { in force_set_env() 182 setenv(var, value, 1); in force_set_env() 183 pr_debug("set env: %s=%s\n", var, value); in force_set_env()
|
D | parse-options.c | 97 *(int *)opt->value &= ~opt->defval; in get_value() 99 *(int *)opt->value |= opt->defval; in get_value() 103 *(bool *)opt->value = unset ? false : true; in get_value() 109 *(int *)opt->value = unset ? 0 : *(int *)opt->value + 1; in get_value() 113 *(unsigned int *)opt->value = unset ? 0 : opt->defval; in get_value() 117 *(void **)opt->value = unset ? NULL : (void *)opt->defval; in get_value() 123 *(const char **)opt->value = NULL; in get_value() 125 *(const char **)opt->value = (const char *)opt->defval; in get_value() 127 err = get_arg(p, opt, flags, (const char **)opt->value); in get_value() 131 const char *val = *(const char **)opt->value; in get_value() [all …]
|
/tools/testing/selftests/networking/timestamping/ |
D | hwtstamp_config.c | 21 int value; in lookup_value() local 23 for (value = 0; value < size; value++) in lookup_value() 24 if (names[value] && strcasecmp(names[value], name) == 0) in lookup_value() 25 return value; in lookup_value() 31 lookup_name(const char **names, int size, int value) in lookup_name() argument 33 return (value >= 0 && value < size) ? names[value] : NULL; in lookup_name() 38 int value; in list_names() local 40 for (value = 0; value < size; value++) in list_names() 41 if (names[value]) in list_names() 42 fprintf(f, " %s\n", names[value]); in list_names()
|
/tools/perf/scripts/perl/Perf-Trace-Util/lib/Perf/Trace/ |
D | Core.pm | 33 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/ |
D | Core.py | 20 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 …]
|
D | Util.py | 35 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/testing/fault-injection/ |
D | failcmd.sh | 26 Default value is 1 28 -t value 29 --times=value 31 Default value is 1 33 --oom-kill-allocating-task=value 34 set /proc/sys/vm/oom_kill_allocating_task to specified value 36 Default value is 1 41 --interval=value, --space=value, --verbose=value, --task-filter=value, 42 --stacktrace-depth=value, --require-start=value, --require-end=value, 43 --reject-start=value, --reject-end=value, --ignore-gfp-wait=value [all …]
|
/tools/power/cpupower/utils/helpers/ |
D | cpuid.c | 48 char value[64]; in get_cpu_info() local 66 if (!fgets(value, 64, fp)) in get_cpu_info() 68 value[63 - 1] = '\0'; in get_cpu_info() 70 if (!strncmp(value, "processor\t: ", 12)) in get_cpu_info() 71 sscanf(value, "processor\t: %u", &proc); in get_cpu_info() 77 if (!strncmp(value, "vendor_id", 9)) { in get_cpu_info() 79 if (strstr(value, cpu_vendor_table[x])) in get_cpu_info() 83 } else if (!strncmp(value, "cpu family\t: ", 13)) { in get_cpu_info() 84 sscanf(value, "cpu family\t: %u", in get_cpu_info() 86 } else if (!strncmp(value, "model\t\t: ", 9)) { in get_cpu_info() [all …]
|
D | sysfs.c | 53 unsigned long long value; in sysfs_is_cpu_online() local 83 value = strtoull(linebuf, &endp, 0); in sysfs_is_cpu_online() 84 if (value > 1) in sysfs_is_cpu_online() 87 return value; in sysfs_is_cpu_online() 161 const char *value, size_t len) in sysfs_idlestate_write_file() argument 174 numwrite = write(fd, value, len); in sysfs_idlestate_write_file() 208 unsigned long long value; in sysfs_idlestate_get_one_value() local 222 value = strtoull(linebuf, &endp, 0); in sysfs_idlestate_get_one_value() 227 return value; in sysfs_idlestate_get_one_value() 303 char value[SYSFS_PATH_MAX]; in sysfs_idlestate_disable() local [all …]
|
/tools/lib/api/fs/ |
D | fs.h | 27 int filename__read_int(const char *filename, int *value); 28 int filename__read_ull(const char *filename, unsigned long long *value); 30 int sysctl__read_int(const char *sysctl, int *value); 31 int sysfs__read_int(const char *entry, int *value); 32 int sysfs__read_ull(const char *entry, unsigned long long *value);
|
D | fs.c | 270 int filename__read_int(const char *filename, int *value) in filename__read_int() argument 279 *value = atoi(line); in filename__read_int() 287 int filename__read_ull(const char *filename, unsigned long long *value) in filename__read_ull() argument 296 *value = strtoull(line, NULL, 10); in filename__read_ull() 297 if (*value != ULLONG_MAX) in filename__read_ull() 305 int sysfs__read_ull(const char *entry, unsigned long long *value) in sysfs__read_ull() argument 315 return filename__read_ull(path, value); in sysfs__read_ull() 318 int sysfs__read_int(const char *entry, int *value) in sysfs__read_int() argument 328 return filename__read_int(path, value); in sysfs__read_int() 331 int sysctl__read_int(const char *sysctl, int *value) in sysctl__read_int() argument [all …]
|
/tools/perf/util/intel-pt-decoder/ |
D | insn.c | 139 insn->rex_prefix.value = b; in insn_get_prefixes() 265 modrm->value = mod; in insn_get_modrm() 304 return (modrm->nbytes && (modrm->value & 0xc7) == 0x5); in insn_rip_relative() 323 modrm = (insn_byte_t)insn->modrm.value; in insn_get_sib() 326 insn->sib.value = get_next(insn_byte_t, insn); in insn_get_sib() 371 mod = X86_MODRM_MOD(insn->modrm.value); in insn_get_displacement() 372 rm = X86_MODRM_RM(insn->modrm.value); in insn_get_displacement() 373 base = X86_SIB_BASE(insn->sib.value); in insn_get_displacement() 377 insn->displacement.value = get_next(char, insn); in insn_get_displacement() 381 insn->displacement.value = in insn_get_displacement() [all …]
|
/tools/testing/selftests/powerpc/pmu/ebb/ |
D | trace.c | 87 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 …]
|
D | ebb.c | 186 static char *decode_mmcr0(u32 value) in decode_mmcr0() argument 192 if (value & (1 << 31)) in decode_mmcr0() 194 if (value & (1 << 26)) in decode_mmcr0() 196 if (value & (1 << 7)) in decode_mmcr0() 202 static char *decode_bescr(u64 value) in decode_bescr() argument 208 if (value & (1ull << 63)) in decode_bescr() 210 if (value & (1ull << 32)) in decode_bescr() 212 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 …]
|
D | instruction_count_test.c | 45 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/ |
D | export-to-postgresql.py | 662 value = struct.pack(fmt, 2, 8, evsel_id, n, evsel_name) 663 evsel_file.write(value) 668 value = struct.pack(fmt, 3, 8, machine_id, 4, pid, n, root_dir) 669 machine_file.write(value) 672 value = struct.pack("!hiqiqiqiiii", 5, 8, thread_id, 8, machine_id, 8, process_id, 4, pid, 4, tid) 673 thread_file.write(value) 678 value = struct.pack(fmt, 2, 8, comm_id, n, comm_str) 679 comm_file.write(value) 683 value = struct.pack(fmt, 3, 8, comm_thread_id, 8, comm_id, 8, thread_id) 684 comm_thread_file.write(value) [all …]
|
D | call-graph-from-postgresql.py | 87 if not query.value(0): 92 child_item.setUpLevel1(query.value(0), query.value(1)) 108 child_item.setUpLevel2(comm_id, query.value(0), query.value(1), query.value(2)) 175 if query.value(1) == last_call_path_id: 177 branch_count += query.value(2) 178 time += query.value(4) - query.value(3) 182 last_call_path_id = query.value(1) 183 name = query.value(5) 184 dso = query.value(6) 188 branch_count = query.value(2) [all …]
|
/tools/perf/ |
D | builtin-help.c | 194 const char *value) in do_add_man_viewer_info() argument 199 new->info = strdup(value); in do_add_man_viewer_info() 206 const char *value) in add_man_viewer_path() argument 209 do_add_man_viewer_info(name, len, value); in add_man_viewer_path() 220 const char *value) in add_man_viewer_cmd() argument 227 do_add_man_viewer_info(name, len, value); in add_man_viewer_cmd() 232 static int add_man_viewer_info(const char *var, const char *value) in add_man_viewer_info() argument 241 if (!value) in add_man_viewer_info() 243 return add_man_viewer_path(name, subkey - name, value); in add_man_viewer_info() 246 if (!value) in add_man_viewer_info() [all …]
|
/tools/virtio/virtio-trace/ |
D | trace-agent.c | 74 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()
|
/tools/testing/selftests/powerpc/pmu/ |
D | count_instructions.c | 46 difference = events[0].result.value - expected; in do_count_loop() 47 percentage = (double)difference / events[0].result.value * 100; in do_count_loop() 55 printf("Actual %llu\n", events[0].result.value); in do_count_loop() 67 if (difference / events[0].result.value) in do_count_loop() 80 overhead = events[0].result.value; in determine_overhead() 84 current = events[0].result.value; in determine_overhead()
|