Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Linux Kernel
tools/perf/util/rblist.c
void rblist__remove_node(struct rblist *rblist, struct rb_node *rb_node) { rb_erase_cached(rb_node, &rblist->entries); --rblist->nr_entries; rblist->node_delete(rblist, rb_node); }
[ 1, 0 ]
Linux Kernel
tools/perf/util/rblist.c
static struct rb_node *__rblist__findnew(struct rblist *rblist, const void *entry, bool create) { struct rb_node **p = &rblist->entries.rb_root.rb_node; struct rb_node *parent = NULL, *new_node = NULL; bool leftmost = true; while (*p != NULL) { int rc; parent ...
[ 1, 0 ]
Linux Kernel
tools/perf/util/rblist.c
void rblist__exit(struct rblist *rblist) { struct rb_node *pos, *next = rb_first_cached(&rblist->entries); while (next) { pos = next; next = rb_next(pos); rblist__remove_node(rblist, pos); } }
[ 0, 0 ]
Linux Kernel
tools/perf/util/record.c
static struct evsel *evsel__read_sampler(struct evsel *evsel, struct evlist *evlist) { struct evsel *leader = evsel__leader(evsel); if (evsel__is_aux_event(leader) || arch_topdown_sample_read(leader) || is_mem_loads_aux_event(leader)) { evlist__for_each_entry(evli...
[ 0, 0 ]
Linux Kernel
tools/perf/util/record.c
int record__parse_freq(const struct option *opt, const char *str, int unset __maybe_unused) { unsigned int freq; struct record_opts *opts = opt->value; if (!str) return -EINVAL; if (strcasecmp(str, "max") == 0) { if (get_max_rate(&freq)) { pr_err("couldn't read /proc/sys/...
[ 0, 0 ]
Linux Kernel
tools/perf/util/rlimit.c
void rlimit__bump_memlock(void) { struct rlimit rlim; if (getrlimit(RLIMIT_MEMLOCK, &rlim) == 0) { rlim.rlim_cur *= 4; rlim.rlim_max *= 4; if (setrlimit(RLIMIT_MEMLOCK, &rlim) < 0) { rlim.rlim_cur /= 2; rlim.rlim_max /= 2; if (setrlimit(RLIMIT_MEMLOCK, &rlim) < 0) pr_debug("...
[ 0, 0 ]
Linux Kernel
tools/perf/util/rwsem.c
int down_write(struct rw_semaphore *sem) { return perf_singlethreaded ? 0 : pthread_rwlock_wrlock(&sem->lock); }
[ 0, 0 ]
Linux Kernel
tools/perf/util/rwsem.c
int up_write(struct rw_semaphore *sem) { return perf_singlethreaded ? 0 : pthread_rwlock_unlock(&sem->lock); }
[ 0, 0 ]
Linux Kernel
tools/perf/util/s390-cpumsf.c
static void s390_cpumsf_dump(struct s390_cpumsf *sf, unsigned char *buf, size_t len) { const char *color = PERF_COLOR_BLUE; struct hws_basic_entry *basic; struct hws_diag_entry *diag; unsigned short bsdes, dsdes; size_t pos = 0; color_fprintf(stdout, color, ". ... s390 AUX data...
[ 1, 0 ]
Linux Kernel
tools/perf/util/s390-cpumsf.c
static int s390_cpumsf_setup_queues(struct s390_cpumsf *sf, u64 ts) { unsigned int i; int ret = 0; for (i = 0; i < sf->queues.nr_queues; i++) { ret = s390_cpumsf_setup_queue(sf, &sf->queues.queue_array[i], i, ts); if (ret) break; } return ret; }
[ 0, 0 ]
Linux Kernel
tools/perf/util/s390-cpumsf.c
static int s390_cpumsf_process_auxtrace_event(struct perf_session *session, union perf_event *event __maybe_unused, struct perf_tool *tool __maybe_unused) { struct s390_cpumsf *sf = container_of(session->auxtrace, struct s390_cpumsf, auxtrace...
[ 0, 0 ]
Linux Kernel
tools/perf/util/s390-cpumsf.c
static void s390_cpumsf_free_queues(struct perf_session *session) { struct s390_cpumsf *sf = container_of(session->auxtrace, struct s390_cpumsf, auxtrace); struct auxtrace_queues *queues = &sf->queues; unsigned int i; for (i = 0; i < queues->nr_queues; i++) { struct s390_cpumsf_queue *sfq = ...
[ 1, 0 ]
Linux Kernel
tools/perf/util/s390-cpumsf.c
static void s390_cpumsf_free(struct perf_session *session) { struct s390_cpumsf *sf = container_of(session->auxtrace, struct s390_cpumsf, auxtrace); auxtrace_heap__free(&sf->heap); s390_cpumsf_free_queues(session); session->auxtrace = NULL; zfree(&sf->logdir); free(sf); }
[ 1, 0 ]
Linux Kernel
tools/perf/util/s390-cpumsf.c
static int s390_cpumsf_get_type(const char *cpuid) { int ret, family = 0; ret = sscanf(cpuid, "%*[^,],%u", &family); return (ret == 1) ? family : 0; }
[ 1, 0 ]
Linux Kernel
tools/perf/util/s390-sample-raw.c
static size_t ctrset_size(struct cf_ctrset_entry *set) { return sizeof(*set) + set->ctr * sizeof(u64); }
[ 1, 0 ]
Linux Kernel
tools/perf/util/s390-sample-raw.c
static bool ctrset_valid(struct cf_ctrset_entry *set) { return set->def == S390_CPUMCF_DIAG_DEF; }
[ 0, 0 ]
Linux Kernel
tools/perf/util/s390-sample-raw.c
static int get_counterset_start(int setnr) { switch (setnr) { case CPUMF_CTR_SET_BASIC: return 0; case CPUMF_CTR_SET_USER: /* Problem state counter set */ return 32; case CPUMF_CTR_SET_CRYPTO: /* Crypto counter set */ return 64; case CPUMF_CTR_SET_EXT: /* Extended counter set */ return 128; ...
[ 0, 0 ]
Linux Kernel
tools/perf/util/s390-sample-raw.c
void evlist__s390_sample_raw(struct evlist *evlist, union perf_event *event, struct perf_sample *sample) { struct evsel *ev_bc000; if (event->header.type != PERF_RECORD_SAMPLE) return; ev_bc000 = evlist__event2evsel(evlist, event); if (ev_bc000 == NULL || ev_bc000->core.attr.c...
[ 0, 0 ]
Linux Kernel
tools/perf/util/scripting-engines/trace-event-perl.c
void xs_init(pTHX) { const char *file = __FILE__; dXSUB_SYS; newXS("Perf::Trace::Context::bootstrap", boot_Perf__Trace__Context, file); newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, file); }
[ 0, 0 ]
Linux Kernel
tools/perf/util/scripting-engines/trace-event-perl.c
static void define_symbolic_value(const char *ev_name, const char *field_name, const char *field_value, const char *field_str) { unsigned long long value; dSP; value = eval_flag(field_value); ENTER; SAVETMPS; PUSHMARK(SP); XPUSHs(sv_2...
[ 0, 0 ]
Linux Kernel
tools/perf/util/scripting-engines/trace-event-perl.c
static void define_flag_field(const char *ev_name, const char *field_name, const char *delim) { dSP; ENTER; SAVETMPS; PUSHMARK(SP); XPUSHs(sv_2mortal(newSVpv(ev_name, 0))); XPUSHs(sv_2mortal(newSVpv(field_name, 0))); XPUSHs(sv_2mortal(newSVpv(delim, 0))); PUTBACK; if ...
[ 0, 0 ]
Linux Kernel
tools/perf/util/scripting-engines/trace-event-perl.c
static void perl_process_event_generic(union perf_event *event, struct perf_sample *sample, struct evsel *evsel) { dSP; if (!get_cv("process_event", 0)) return; ENTER; SAVETMPS; PUSHMARK(SP); XPUSHs(sv_2mortal(newSVpvn((con...
[ 1, 0 ]
Linux Kernel
tools/perf/util/scripting-engines/trace-event-perl.c
static int perl_flush_script(void) { return 0; }
[ 0, 0 ]
Linux Kernel
tools/perf/util/scripting-engines/trace-event-python.c
static void try_call_object(const char *handler_name, PyObject *args) { PyObject *handler; handler = get_handler(handler_name); if (handler) call_object(handler, args, handler_name); }
[ 0, 0 ]
Linux Kernel
tools/perf/util/scripting-engines/trace-event-python.c
static void define_value(enum tep_print_arg_type field_type, const char *ev_name, const char *field_name, const char *field_value, const char *field_str) { const char *handler_name = "define_flag_value"; PyObject *t; unsigned long long value; unsigned n = 0; ...
[ 1, 0 ]
Linux Kernel
tools/perf/util/scripting-engines/trace-event-python.c
static void define_values(enum tep_print_arg_type field_type, struct tep_print_flag_sym *field, const char *ev_name, const char *field_name) { define_value(field_type, ev_name, field_name, field->value, field->str); if (field->next) define_values(field_type,...
[ 0, 0 ]
Linux Kernel
tools/perf/util/scripting-engines/trace-event-python.c
static void define_field(enum tep_print_arg_type field_type, const char *ev_name, const char *field_name, const char *delim) { const char *handler_name = "define_flag_field"; PyObject *t; unsigned n = 0; if (field_type == TEP_PRINT_SYMBOL) handler_name = "...
[ 1, 0 ]
Linux Kernel
tools/perf/util/scripting-engines/trace-event-python.c
static const char *get_dsoname(struct map *map) { const char *dsoname = "[unknown]"; if (map && map->dso) { if (symbol_conf.show_kernel_path && map->dso->long_name) dsoname = map->dso->long_name; else dsoname = map->dso->name; } return dsoname; }
[ 1, 0 ]
Linux Kernel
tools/perf/util/scripting-engines/trace-event-python.c
static void set_sample_datasrc_in_dict(PyObject *dict, struct perf_sample *sample) { struct mem_info mi = {.data_src.val = sample->data_src}; char decode[100]; pydict_set_item_string_decref(dict, "datasrc", PyLong_FromUnsignedLongLong(sample...
[ 0, 0 ]
Linux Kernel
tools/perf/util/scripting-engines/trace-event-python.c
static int tuple_set_u64(PyObject *t, unsigned int pos, u64 val) { #if BITS_PER_LONG == 64 return PyTuple_SetItem(t, pos, PyLong_FromUnsignedLong(val)); #endif #if BITS_PER_LONG == 32 return PyTuple_SetItem(t, pos, PyLong_FromUnsignedLongLong(val)); #endif }
[ 0, 0 ]
Linux Kernel
tools/perf/util/scripting-engines/trace-event-python.c
static int python_export_dso(struct db_export *dbe, struct dso *dso, struct machine *machine) { struct tables *tables = container_of(dbe, struct tables, dbe); char sbuild_id[SBUILD_ID_SIZE]; PyObject *t; build_id__sprintf(&dso->bid, sbuild_id); t = tuple_new(5); tuple_set_d6...
[ 0, 0 ]
Linux Kernel
tools/perf/util/scripting-engines/trace-event-python.c
static int python_export_symbol(struct db_export *dbe, struct symbol *sym, struct dso *dso) { struct tables *tables = container_of(dbe, struct tables, dbe); u64 *sym_db_id = symbol__priv(sym); PyObject *t; t = tuple_new(6); tuple_set_d64(t, 0, *sym_db_id); tuple_set_d64(t,...
[ 0, 0 ]
Linux Kernel
tools/perf/util/scripting-engines/trace-event-python.c
static int python_export_sample(struct db_export *dbe, struct export_sample *es) { struct tables *tables = container_of(dbe, struct tables, dbe); python_export_sample_table(dbe, es); if (es->evsel->core.attr.type == PERF_TYPE_SYNTH && tables->synth_handler) python_export_syn...
[ 1, 0 ]
Linux Kernel
tools/perf/util/scripting-engines/trace-event-python.c
static int python_export_call_path(struct db_export *dbe, struct call_path *cp) { struct tables *tables = container_of(dbe, struct tables, dbe); PyObject *t; u64 parent_db_id, sym_db_id; parent_db_id = cp->parent ? cp->parent->db_id : 0; sym_db_id = cp->sym ? *(u64 *)symbo...
[ 0, 0 ]
Linux Kernel
tools/perf/util/scripting-engines/trace-event-python.c
static int python_export_context_switch(struct db_export *dbe, u64 db_id, struct machine *machine, struct perf_sample *sample, u64 th_out_id, u64 comm_out_id, ...
[ 0, 0 ]
Linux Kernel
tools/perf/util/scripting-engines/trace-event-python.c
static void python_process_throttle(union perf_event *event, struct perf_sample *sample, struct machine *machine) { const char *handler_name; PyObject *handler, *t; if (event->header.type == PERF_RECORD_THROTTLE) handler_name = "throttl...
[ 0, 0 ]
Linux Kernel
tools/perf/util/scripting-engines/trace-event-python.c
static void python_process_switch(union perf_event *event, struct perf_sample *sample, struct machine *machine) { struct tables *tables = &tables_global; if (tables->db_export_mode) db_export__switch(&tables->dbe, event, sample, machine); e...
[ 0, 0 ]
Linux Kernel
tools/perf/util/scripting-engines/trace-event-python.c
static void _free_command_line(const char **command_line, int num) { free(command_line); } #else
[ 1, 0 ]
Linux Kernel
tools/perf/util/session.c
void perf_session__set_id_hdr_size(struct perf_session *session) { u16 id_hdr_size = evlist__id_hdr_size(session->evlist); machines__set_id_hdr_size(&session->machines, id_hdr_size); }
[ 0, 0 ]
Linux Kernel
tools/perf/util/session.c
static void perf_session__delete_threads(struct perf_session *session) { machine__delete_threads(&session->machines.host); }
[ 0, 0 ]
Linux Kernel
tools/perf/util/session.c
void perf_session__delete(struct perf_session *session) { if (session == NULL) return; auxtrace__free(session); auxtrace_index__free(&session->auxtrace_index); perf_session__destroy_kernel_maps(session); perf_session__delete_threads(session); perf_decomp__release_events(session->decomp_data.decomp); ...
[ 1, 0 ]
Linux Kernel
tools/perf/util/session.c
static int process_event_synth_tracing_data_stub( struct perf_session *session __maybe_unused, union perf_event *event __maybe_unused) { dump_printf(": unhandled!\n"); return 0; }
[ 0, 0 ]
Linux Kernel
tools/perf/util/session.c
static int process_event_synth_attr_stub(struct perf_tool *tool __maybe_unused, union perf_event *event __maybe_unused, struct evlist **pevlist __maybe_unused) { dump_printf(": unhandled!\n"); return 0; }
[ 0, 0 ]
Linux Kernel
tools/perf/util/session.c
static int process_event_synth_event_update_stub(struct perf_tool *tool __maybe_unused, union perf_event *event __maybe_unused, struct evlist **pevlist __maybe_unused) { if (dump_trace) perf_event__fprintf_event_update(event, stdout); ...
[ 0, 0 ]
Linux Kernel
tools/perf/util/session.c
static int process_event_stub(struct perf_tool *tool __maybe_unused, union perf_event *event __maybe_unused, struct perf_sample *sample __maybe_unused, struct machine *machine __maybe_unused) { dump_printf(": unhandled!\n"); ...
[ 0, 0 ]
Linux Kernel
tools/perf/util/session.c
static int process_event_thread_map_stub(struct perf_session *session __maybe_unused, union perf_event *event __maybe_unused) { if (dump_trace) perf_event__fprintf_thread_map(event, stdout); dump_printf(": unhandled!\n"); return 0; }
[ 0, 0 ]
Linux Kernel
tools/perf/util/session.c
static int process_event_cpu_map_stub(struct perf_session *session __maybe_unused, union perf_event *event __maybe_unused) { if (dump_trace) perf_event__fprintf_cpu_map(event, stdout); dump_printf(": unhandled!\n"); return 0; }
[ 0, 0 ]
Linux Kernel
tools/perf/util/session.c
static int process_stat_round_stub(struct perf_session *perf_session __maybe_unused, union perf_event *event) { if (dump_trace) perf_event__fprintf_stat_round(event, stdout); dump_printf(": unhandled!\n"); return 0; }
[ 0, 0 ]
Linux Kernel
tools/perf/util/session.c
static int process_event_time_conv_stub(struct perf_session *perf_session __maybe_unused, union perf_event *event) { if (dump_trace) perf_event__fprintf_time_conv(event, stdout); dump_printf(": unhandled!\n"); return 0; }
[ 0, 0 ]
Linux Kernel
tools/perf/util/session.c
static void perf_event__mmap_swap(union perf_event *event, bool sample_id_all) { event->mmap.pid = bswap_32(event->mmap.pid); event->mmap.tid = bswap_32(event->mmap.tid); event->mmap.start = bswap_64(event->mmap.start); event->mmap.len = bswap_64(event->mmap.len); event->mmap.pgoff = bswap_64(event->mmap.pgo...
[ 1, 0 ]
Linux Kernel
tools/perf/util/session.c
static void perf_event__task_swap(union perf_event *event, bool sample_id_all) { event->fork.pid = bswap_32(event->fork.pid); event->fork.tid = bswap_32(event->fork.tid); event->fork.ppid = bswap_32(event->fork.ppid); event->fork.ptid = bswap_32(event->fork.ptid); event->fork.time = bswap_64(event->fork.time)...
[ 0, 0 ]
Linux Kernel
tools/perf/util/session.c
static void perf_event__aux_swap(union perf_event *event, bool sample_id_all) { event->aux.aux_offset = bswap_64(event->aux.aux_offset); event->aux.aux_size = bswap_64(event->aux.aux_size); event->aux.flags = bswap_64(event->aux.flags); if (sample_id_all) swap_sample_id_all(event, &event->aux + 1); }
[ 0, 0 ]
Linux Kernel
tools/perf/util/session.c
static void perf_event__itrace_start_swap(union perf_event *event, bool sample_id_all) { event->itrace_start.pid = bswap_32(event->itrace_start.pid); event->itrace_start.tid = bswap_32(event->itrace_start.tid); if (sample_id_all) swap_sample_id_all(event, &event->it...
[ 0, 0 ]
Linux Kernel
tools/perf/util/session.c
static void perf_event__switch_swap(union perf_event *event, bool sample_id_all) { if (event->header.type == PERF_RECORD_SWITCH_CPU_WIDE) { event->context_switch.next_prev_pid = bswap_32(event->context_switch.next_prev_pid); event->context_switch.next_prev_tid = ...
[ 0, 0 ]
Linux Kernel
tools/perf/util/session.c
static void perf_event__event_update_swap(union perf_event *event, bool sample_id_all __maybe_unused) { event->event_update.type = bswap_64(event->event_update.type); event->event_update.id = bswap_64(event->event_update.id); }
[ 0, 0 ]
Linux Kernel
tools/perf/util/session.c
static void perf_event__thread_map_swap(union perf_event *event, bool sample_id_all __maybe_unused) { unsigned i; event->thread_map.nr = bswap_64(event->thread_map.nr); for (i = 0; i < event->thread_map.nr; i++) event->thread_map.entries[i].pid = bswap_64(eve...
[ 0, 0 ]
Linux Kernel
tools/perf/util/session.c
static void perf_event__cpu_map_swap(union perf_event *event, bool sample_id_all __maybe_unused) { struct perf_record_cpu_map_data *data = &event->cpu_map.data; data->type = bswap_16(data->type); switch (data->type) { case PERF_CPU_MAP__CPUS: data->cpus_data.nr = bswa...
[ 1, 0 ]
Linux Kernel
tools/perf/util/session.c
static void perf_event__stat_config_swap(union perf_event *event, bool sample_id_all __maybe_unused) { u64 size; size = bswap_64(event->stat_config.nr) * sizeof(event->stat_config.data[0]); size += 1; mem_bswap_64(&event->stat_config.nr, size); }
[ 1, 0 ]
Linux Kernel
tools/perf/util/session.c
static void regs_user__printf(struct perf_sample *sample, const char *arch) { struct regs_dump *user_regs = &sample->user_regs; if (user_regs->regs) regs__printf("user", user_regs, arch); }
[ 0, 0 ]
Linux Kernel
tools/perf/util/session.c
static struct machine *machines__find_for_cpumode(struct machines *machines, union perf_event *event, struct perf_sample *sample) { if (perf_guest && ((sample->cpumode == PERF_RECORD_MISC_GUEST_KERNEL) || ...
[ 1, 0 ]
Linux Kernel
tools/perf/util/session.c
static int deliver_sample_value(struct evlist *evlist, struct perf_tool *tool, union perf_event *event, struct perf_sample *sample, struct sample_read_value *v, struct machine *machine) { st...
[ 1, 0 ]
Linux Kernel
tools/perf/util/session.c
static int evlist__deliver_sample(struct evlist *evlist, struct perf_tool *tool, union perf_event *event, struct perf_sample *sample, struct evsel *evsel, struct machine *machine) { ...
[ 0, 0 ]
Linux Kernel
tools/perf/util/session.c
static int perf_session__deliver_event(struct perf_session *session, union perf_event *event, struct perf_tool *tool, u64 file_offset, const char *file_path) { struct perf_sample sample; int ret = e...
[ 0, 0 ]
Linux Kernel
tools/perf/util/session.c
int perf_session__deliver_synth_event(struct perf_session *session, union perf_event *event, struct perf_sample *sample) { struct evlist *evlist = session->evlist; struct perf_tool *tool = session->tool; events_stats__inc(&evlist->stats...
[ 0, 0 ]
Linux Kernel
tools/perf/util/session.c
static s64 perf_session__process_event(struct perf_session *session, union perf_event *event, u64 file_offset, const char *file_path) { struct evlist *evlist = session->evlist; struct perf_tool *tool = session->tool; int ret; if (se...
[ 1, 0 ]
Linux Kernel
tools/perf/util/session.c
struct thread *perf_session__findnew(struct perf_session *session, pid_t pid) { return machine__findnew_thread(&session->machines.host, -1, pid); }
[ 0, 0 ]
Linux Kernel
tools/perf/util/session.c
static union perf_event *prefetch_event(char *buf, u64 head, size_t mmap_size, bool needs_swap, union perf_event *error) { union perf_event *event; u16 event_size; if (head + sizeof(event->header) > mmap_size) return NULL; eve...
[ 1, 0 ]
Linux Kernel
tools/perf/util/session.c
static void reader__release_decomp(struct reader *rd) { perf_decomp__release_events(rd->decomp_data.decomp); zstd_fini(&rd->zstd_data); }
[ 0, 0 ]
Linux Kernel
tools/perf/util/session.c
static int reader__process_events(struct reader *rd, struct perf_session *session, struct ui_progress *prog) { int err; err = reader__init(rd, &session->one_mmap); if (err) goto out; session->active_decomp = &rd->decomp_data; remap: e...
[ 0, 0 ]
Linux Kernel
tools/perf/util/session.c
size_t perf_session__fprintf_nr_events(struct perf_session *session, FILE *fp, bool skip_empty) { size_t ret; const char *msg = ""; if (perf_header__has_feat(&session->header, HEADER_AUXTRACE)) msg = " (excludes AUX area (e.g. instruction trace) decoded / synthesized "...
[ 0, 0 ]
Linux Kernel
tools/perf/util/session.c
static int perf_session__register_guest(struct perf_session *session, pid_t machine_pid) { struct machine *machine = machines__findnew(&session->machines, machine_pid); struct thread *thread; if (!machine) return -ENOMEM; machine->single_address_space = session->ma...
[ 0, 0 ]
Linux Kernel
tools/perf/util/setns.c
int setns(int fd, int nstype) { return syscall(__NR_setns, fd, nstype); }
[ 0, 0 ]
Linux Kernel
tools/perf/util/sideband_evlist.c
int evlist__add_sb_event(struct evlist *evlist, struct perf_event_attr *attr, evsel__sb_cb_t cb, void *data) { struct evsel *evsel; if (!attr->sample_id_all) { pr_warning("enabling sample_id_all for all side band events\n"); attr->sample_id_all = 1; } evsel = evsel__new_idx(a...
[ 0, 0 ]
Linux Kernel
tools/perf/util/sort.c
static int64_t sort__comm_collapse(struct hist_entry *left, struct hist_entry *right) { return strcmp(comm__str(right->comm), comm__str(left->comm)); }
[ 0, 0 ]
Linux Kernel
tools/perf/util/sort.c
static int64_t _sort__dso_cmp(struct map *map_l, struct map *map_r) { struct dso *dso_l = map_l ? map_l->dso : NULL; struct dso *dso_r = map_r ? map_r->dso : NULL; const char *dso_name_l, *dso_name_r; if (!dso_l || !dso_r) return cmp_null(dso_r, dso_l); if (verbose > 0) { dso_name_l = dso_l->long_na...
[ 0, 0 ]
Linux Kernel
tools/perf/util/sort.c
static int _hist_entry__dso_snprintf(struct map *map, char *bf, size_t size, unsigned int width) { if (map && map->dso) { const char *dso_name = verbose > 0 ? map->dso->long_name : map->dso->short_name; return repsep_snprintf(bf, size, "%-*.*s", width, width, dso_...
[ 1, 0 ]
Linux Kernel
tools/perf/util/sort.c
static int hist_entry__dso_filter(struct hist_entry *he, int type, const void *arg) { const struct dso *dso = arg; if (type != HIST_FILTER__DSO) return -1; return dso && (!he->ms.map || he->ms.map->dso != dso); }
[ 1, 0 ]
Linux Kernel
tools/perf/util/sort.c
static int _hist_entry__sym_snprintf(struct map_symbol *ms, u64 ip, char level, char *bf, size_t size, unsigned int width) { struct symbol *sym = ms->sym; struct map *map = ms->map; size_t ret = 0; if (verbose > 0) { char o = map ? ...
[ 1, 0 ]
Linux Kernel
tools/perf/util/sort.c
int hist_entry__sym_snprintf(struct hist_entry *he, char *bf, size_t size, unsigned int width) { return _hist_entry__sym_snprintf(&he->ms, he->ip, he->level, bf, size, width); }
[ 0, 0 ]
Linux Kernel
tools/perf/util/sort.c
static int64_t sort__srcline_cmp(struct hist_entry *left, struct hist_entry *right) { if (!left->srcline) left->srcline = hist_entry__srcline(left); if (!right->srcline) right->srcline = hist_entry__srcline(right); return strcmp(right->srcline, left->srcline); }
[ 0, 0 ]
Linux Kernel
tools/perf/util/sort.c
static char *hist_entry__get_srcfile(struct hist_entry *e) { char *sf, *p; struct map *map = e->ms.map; if (!map) return no_srcfile; sf = __get_srcline(map->dso, map__rip_2objdump(map, e->ip), e->ms.sym, false, true, true, e->ip); if (!strcmp(sf, SRCLINE_UNKNOWN)) return no_src...
[ 1, 0 ]
Linux Kernel
tools/perf/util/sort.c
static int64_t sort__srcfile_cmp(struct hist_entry *left, struct hist_entry *right) { if (!left->srcfile) left->srcfile = hist_entry__get_srcfile(left); if (!right->srcfile) right->srcfile = hist_entry__get_srcfile(right); return strcmp(right->srcfile, left->srcfile); }
[ 0, 0 ]
Linux Kernel
tools/perf/util/sort.c
static int hist_entry__srcfile_snprintf(struct hist_entry *he, char *bf, size_t size, unsigned int width) { if (!he->srcfile) he->srcfile = hist_entry__get_srcfile(he); return repsep_snprintf(bf, size, "%-.*s", width, he->srcfile); }
[ 0, 0 ]
Linux Kernel
tools/perf/util/sort.c
static int hist_entry__parent_snprintf(struct hist_entry *he, char *bf, size_t size, unsigned int width) { return repsep_snprintf(bf, size, "%-*.*s", width, width, he->parent ? he->parent->name : "[other]"); }
[ 0, 0 ]
Linux Kernel
tools/perf/util/sort.c
static int64_t sort__cpu_cmp(struct hist_entry *left, struct hist_entry *right) { return right->cpu - left->cpu; }
[ 0, 0 ]
Linux Kernel
tools/perf/util/sort.c
static int64_t _sort__cgroup_dev_cmp(u64 left_dev, u64 right_dev) { return (int64_t)(right_dev - left_dev); }
[ 0, 0 ]
Linux Kernel
tools/perf/util/sort.c
static int hist_entry__dso_from_snprintf(struct hist_entry *he, char *bf, size_t size, unsigned int width) { if (he->branch_info) return _hist_entry__dso_snprintf(he->branch_info->from.ms.map, bf, size, width); else return repsep...
[ 0, 0 ]
Linux Kernel
tools/perf/util/sort.c
static int hist_entry__dso_from_filter(struct hist_entry *he, int type, const void *arg) { const struct dso *dso = arg; if (type != HIST_FILTER__DSO) return -1; return dso && (!he->branch_info || !he->branch_info->from.ms.map || he->branch_info->from....
[ 1, 0 ]
Linux Kernel
tools/perf/util/sort.c
static int hist_entry__sym_to_filter(struct hist_entry *he, int type, const void *arg) { const char *sym = arg; if (type != HIST_FILTER__SYMBOL) return -1; return sym && !(he->branch_info && he->branch_info->to.ms.sym && strstr(he->branch_info->to.ms.s...
[ 1, 0 ]
Linux Kernel
tools/perf/util/sort.c
static int hist_entry__addr_from_snprintf(struct hist_entry *he, char *bf, size_t size, unsigned int width) { if (he->branch_info) { struct addr_map_symbol *from = &he->branch_info->from; return _hist_entry__addr_snprintf(&from->ms, from->al_addr, he->level, bf, ...
[ 0, 0 ]
Linux Kernel
tools/perf/util/sort.c
static int64_t sort__mispredict_cmp(struct hist_entry *left, struct hist_entry *right) { unsigned char mp, p; if (!left->branch_info || !right->branch_info) return cmp_null(left->branch_info, right->branch_info); mp = left->branch_info->flags.mispred != right->branch_in...
[ 1, 0 ]
Linux Kernel
tools/perf/util/sort.c
static int64_t sort__cycles_cmp(struct hist_entry *left, struct hist_entry *right) { if (!left->branch_info || !right->branch_info) return cmp_null(left->branch_info, right->branch_info); return left->branch_info->flags.cycles - right->branch_info->flags.cycles; }
[ 1, 0 ]
Linux Kernel
tools/perf/util/sort.c
static int hist_entry__cycles_snprintf(struct hist_entry *he, char *bf, size_t size, unsigned int width) { if (!he->branch_info) return scnprintf(bf, size, "%-.*s", width, "N/A"); if (he->branch_info->flags.cycles == 0) return repsep_snprintf(bf, size, "%-*s", width, ...
[ 1, 0 ]
Linux Kernel
tools/perf/util/sort.c
static int hist_entry__dso_daddr_snprintf(struct hist_entry *he, char *bf, size_t size, unsigned int width) { struct map *map = NULL; if (he->mem_info) map = he->mem_info->daddr.ms.map; return _hist_entry__dso_snprintf(map, bf, size, width); }
[ 0, 0 ]
Linux Kernel
tools/perf/util/sort.c
static int hist_entry__locked_snprintf(struct hist_entry *he, char *bf, size_t size, unsigned int width) { char out[10]; perf_mem__lck_scnprintf(out, sizeof(out), he->mem_info); return repsep_snprintf(bf, size, "%.*s", width, out); }
[ 1, 0 ]
Linux Kernel
tools/perf/util/sort.c
static int64_t sort__tlb_cmp(struct hist_entry *left, struct hist_entry *right) { union perf_mem_data_src data_src_l; union perf_mem_data_src data_src_r; if (left->mem_info) data_src_l = left->mem_info->data_src; else data_src_l.mem_dtlb = PERF_MEM_TLB_NA; if (right->me...
[ 0, 0 ]
Linux Kernel
tools/perf/util/sort.c
static int64_t sort__lvl_cmp(struct hist_entry *left, struct hist_entry *right) { union perf_mem_data_src data_src_l; union perf_mem_data_src data_src_r; if (left->mem_info) data_src_l = left->mem_info->data_src; else data_src_l.mem_lvl = PERF_MEM_LVL_NA; if (right->mem...
[ 0, 0 ]
Linux Kernel
tools/perf/util/sort.c
static int hist_entry__snoop_snprintf(struct hist_entry *he, char *bf, size_t size, unsigned int width) { char out[64]; perf_mem__snp_scnprintf(out, sizeof(out), he->mem_info); return repsep_snprintf(bf, size, "%-*s", width, out); }
[ 1, 0 ]
Linux Kernel
tools/perf/util/sort.c
static int64_t sort__phys_daddr_cmp(struct hist_entry *left, struct hist_entry *right) { uint64_t l = 0, r = 0; if (left->mem_info) l = left->mem_info->daddr.phys_addr; if (right->mem_info) r = right->mem_info->daddr.phys_addr; return (int64_t)(r - l); }
[ 0, 0 ]
Linux Kernel
tools/perf/util/sort.c
static int hist_entry__phys_daddr_snprintf(struct hist_entry *he, char *bf, size_t size, unsigned int width) { uint64_t addr = 0; size_t ret = 0; size_t len = BITS_PER_LONG / 4; addr = he->mem_info->daddr.phys_addr; ret += repsep_snprintf(bf + ret, size - ret, "[%...
[ 1, 0 ]