Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Linux Kernel
tools/perf/util/annotate.c
static void calc_percent(struct sym_hist *sym_hist, struct hists *hists, struct annotation_data *data, s64 offset, s64 end) { unsigned int hits = 0; u64 period = 0; while (offset < end) { hits += sym_hist->addr[offset].nr_samples; period += sym_hist->addr[offset].period; ++o...
[ 1, 0 ]
Linux Kernel
tools/perf/util/annotate.c
static void insert_source_line(struct rb_root *root, struct annotation_line *al, struct annotation_options *opts) { struct annotation_line *iter; struct rb_node **p = &root->rb_node; struct rb_node *parent = NULL; int i, ret; while (*p != NULL) { parent = *p; iter = rb...
[ 0, 0 ]
Linux Kernel
tools/perf/util/annotate.c
static int cmp_source_line(struct annotation_line *a, struct annotation_line *b) { int i; for (i = 0; i < a->data_nr; i++) { if (a->data[i].percent_sum == b->data[i].percent_sum) continue; return a->data[i].percent_sum > b->data[i].percent_sum; } return 0; }
[ 0, 0 ]
Linux Kernel
tools/perf/util/annotate.c
static void __resort_source_line(struct rb_root *root, struct annotation_line *al) { struct annotation_line *iter; struct rb_node **p = &root->rb_node; struct rb_node *parent = NULL; while (*p != NULL) { parent = *p; iter = rb_entry(parent, struct annotation_line, rb_n...
[ 0, 0 ]
Linux Kernel
tools/perf/util/annotate.c
static void print_summary(struct rb_root *root, const char *filename) { struct annotation_line *al; struct rb_node *node; printf("\nSorted summary for file %s\n", filename); printf("----------------------------------------------\n\n"); if (RB_EMPTY_ROOT(root)) { printf(" Nothing higher than %1.1f%%\n",...
[ 0, 0 ]
Linux Kernel
tools/perf/util/annotate.c
int map_symbol__annotation_dump(struct map_symbol *ms, struct evsel *evsel, struct annotation_options *opts) { const char *ev_name = evsel__name(evsel); char buf[1024]; char *filename; int err = -1; FILE *fp; if (asprintf(&filename, "%s.annotation", ms->sym->name) < 0) ...
[ 1, 0 ]
Linux Kernel
tools/perf/util/annotate.c
void annotation__set_offsets(struct annotation *notes, s64 size) { struct annotation_line *al; notes->max_line_len = 0; notes->nr_entries = 0; notes->nr_asm_entries = 0; list_for_each_entry(al, &notes->src->source, node) { size_t line_len = strlen(al->line); if (notes->max_line_len < line_len) ...
[ 1, 1 ]
Linux Kernel
tools/perf/util/annotate.c
void annotation__init_column_widths(struct annotation *notes, struct symbol *sym) { notes->widths.addr = notes->widths.target = notes->widths.min_addr = hex_width(symbol__size(sym)); notes->widths.max_addr = hex_width(sym->end); notes->widths.jumps = width_jumps(notes->m...
[ 0, 0 ]
Linux Kernel
tools/perf/util/annotate.c
int symbol__tty_annotate2(struct map_symbol *ms, struct evsel *evsel, struct annotation_options *opts) { struct dso *dso = ms->map->dso; struct symbol *sym = ms->sym; struct rb_root source_line = RB_ROOT; struct hists *hists = evsel__hists(evsel); char buf[1024]; int err; err =...
[ 1, 0 ]
Linux Kernel
tools/perf/util/annotate.c
int symbol__tty_annotate(struct map_symbol *ms, struct evsel *evsel, struct annotation_options *opts) { struct dso *dso = ms->map->dso; struct symbol *sym = ms->sym; struct rb_root source_line = RB_ROOT; int err; err = symbol__annotate(ms, evsel, opts, NULL); if (err) { char m...
[ 1, 0 ]
Linux Kernel
tools/perf/util/annotate.c
static void ipc_coverage_string(char *bf, int size, struct annotation *notes) { double ipc = 0.0, coverage = 0.0; if (notes->hit_cycles) ipc = notes->hit_insn / ((double)notes->hit_cycles); if (notes->total_insn) { coverage = notes->cover_insn * 100.0 / ((double)notes->total_insn); } scnprintf(bf,...
[ 0, 0 ]
Linux Kernel
tools/perf/util/annotate.c
void annotation_line__write(struct annotation_line *al, struct annotation *notes, struct annotation_write_ops *wops, struct annotation_options *opts) { __annotation_line__write( al, notes, wops->first_line, wops->current_entry,...
[ 0, 0 ]
Linux Kernel
tools/perf/util/annotate.c
void annotation_config__init(struct annotation_options *opt) { perf_config(annotation__config, opt); }
[ 0, 0 ]
Linux Kernel
tools/perf/util/annotate.c
static unsigned int parse_percent_type(char *str1, char *str2) { unsigned int type = (unsigned int)-1; if (!strcmp("period", str1)) { if (!strcmp("local", str2)) type = PERCENT_PERIOD_LOCAL; else if (!strcmp("global", str2)) type = PERCENT_PERIOD_GLOBAL; } if (!strcmp("hits", str1)) { ...
[ 0, 0 ]
Linux Kernel
tools/perf/util/annotate.c
int annotate_check_args(struct annotation_options *args) { if (args->prefix_strip && !args->prefix) { pr_err("--prefix-strip requires --prefix\n"); return -1; } return 0; }
[ 0, 0 ]
Linux Kernel
tools/perf/util/annotate.h
static inline double annotation_data__percent(struct annotation_data *data, unsigned int which) { return which < PERCENT_MAX ? data->percent[which] : -1; }
[ 0, 0 ]
Linux Kernel
tools/perf/util/annotate.h
static inline int annotation__pcnt_width(struct annotation *notes) { return (symbol_conf.show_total_period ? 12 : 7) * notes->nr_events; }
[ 0, 0 ]
Linux Kernel
tools/perf/util/annotate.h
static inline struct sym_hist * annotated_source__histogram(struct annotated_source *src, int idx) { return ((void *)src->histograms) + (src->sizeof_sym_hist * idx); }
[ 0, 0 ]
Linux Kernel
tools/perf/util/annotate.h
static inline struct sym_hist *annotation__histogram(struct annotation *notes, int idx) { return annotated_source__histogram(notes->src, idx); }
[ 0, 0 ]
Linux Kernel
tools/perf/util/arm-spe-decoder/arm-spe-decoder.c
static u64 arm_spe_calc_ip(int index, u64 payload) { u64 ns, el, val; if (index == SPE_ADDR_PKT_HDR_INDEX_INS || index == SPE_ADDR_PKT_HDR_INDEX_BRANCH) { ns = SPE_ADDR_PKT_GET_NS(payload); el = SPE_ADDR_PKT_GET_EL(payload); /* Clean highest byte */ payload = SPE_ADDR_PKT_ADDR_GET_BYTES_0_6(...
[ 0, 0 ]
Linux Kernel
tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.c
static unsigned int arm_spe_payload_len(unsigned char hdr) { return 1U << ((hdr & GENMASK_ULL(5, 4)) >> 4); }
[ 0, 0 ]
Linux Kernel
tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.c
static int arm_spe_get_pad(struct arm_spe_pkt *packet) { packet->type = ARM_SPE_PAD; return 1; }
[ 0, 0 ]
Linux Kernel
tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.c
static int arm_spe_get_alignment(const unsigned char *buf, size_t len, struct arm_spe_pkt *packet) { unsigned int alignment = 1 << ((buf[0] & 0xf) + 1); if (len < alignment) return ARM_SPE_NEED_MORE_BYTES; packet->type = ARM_SPE_PAD; return alignment - (((uintptr_t)buf) &...
[ 1, 0 ]
Linux Kernel
tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.c
static int arm_spe_get_events(const unsigned char *buf, size_t len, struct arm_spe_pkt *packet) { packet->type = ARM_SPE_EVENTS; packet->index = arm_spe_payload_len(buf[0]); return arm_spe_get_payload(buf, len, 0, packet); }
[ 0, 0 ]
Linux Kernel
tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.c
static int arm_spe_get_context(const unsigned char *buf, size_t len, struct arm_spe_pkt *packet) { packet->type = ARM_SPE_CONTEXT; packet->index = SPE_CTX_PKT_HDR_INDEX(buf[0]); return arm_spe_get_payload(buf, len, 0, packet); }
[ 0, 0 ]
Linux Kernel
tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.c
static int arm_spe_get_addr(const unsigned char *buf, size_t len, const unsigned char ext_hdr, struct arm_spe_pkt *packet) { packet->type = ARM_SPE_ADDRESS; if (ext_hdr) packet->index = SPE_HDR_EXTENDED_INDEX(buf[0], buf[1]); else packet->index = S...
[ 0, 0 ]
Linux Kernel
tools/perf/util/arm-spe.c
static void arm_spe_dump_event(struct arm_spe *spe, unsigned char *buf, size_t len) { printf(".\n"); arm_spe_dump(spe, buf, len); }
[ 0, 0 ]
Linux Kernel
tools/perf/util/arm-spe.c
static int arm_spe_get_trace(struct arm_spe_buffer *b, void *data) { struct arm_spe_queue *speq = data; struct auxtrace_buffer *buffer = speq->buffer; struct auxtrace_buffer *old_buffer = speq->old_buffer; struct auxtrace_queue *queue; queue = &speq->spe->queues.queue_array[speq->queue_nr]; buffer = auxtr...
[ 0, 0 ]
Linux Kernel
tools/perf/util/arm-spe.c
static struct arm_spe_queue *arm_spe__alloc_queue(struct arm_spe *spe, unsigned int queue_nr) { struct arm_spe_params params = { .get_trace = 0, }; struct arm_spe_queue *speq; speq = zalloc(sizeof(*speq)); if (!speq) return NULL; speq->event_buf ...
[ 1, 0 ]
Linux Kernel
tools/perf/util/arm-spe.c
static inline u8 arm_spe_cpumode(struct arm_spe *spe, u64 ip) { return ip >= spe->kernel_start ? PERF_RECORD_MISC_KERNEL : PERF_RECORD_MISC_USER; }
[ 0, 0 ]
Linux Kernel
tools/perf/util/arm-spe.c
static void arm_spe_set_pid_tid_cpu(struct arm_spe *spe, struct auxtrace_queue *queue) { struct arm_spe_queue *speq = queue->priv; pid_t tid; tid = machine__get_current_tid(spe->machine, speq->cpu); if (tid != -1) { speq->tid = tid; thread__zput(speq->thread); } e...
[ 1, 0 ]
Linux Kernel
tools/perf/util/arm-spe.c
static int arm_spe__inject_event(union perf_event *event, struct perf_sample *sample, u64 type) { event->header.size = perf_event__sample_event_size(sample, type, 0); return perf_event__synthesize_sample(event, type, 0, sample); }
[ 0, 0 ]
Linux Kernel
tools/perf/util/arm-spe.c
static int arm_spe__synth_instruction_sample(struct arm_spe_queue *speq, u64 spe_events_id, u64 data_src) { struct arm_spe *spe = speq->spe; struct arm_spe_record *record = &speq->decoder->record; union perf_event *event = speq->event_buf; struct perf_sample sample =...
[ 0, 0 ]
Linux Kernel
tools/perf/util/arm-spe.c
static void arm_spe__synth_data_source_generic(const struct arm_spe_record *record, union perf_mem_data_src *data_src) { if (record->type & (ARM_SPE_LLC_ACCESS | ARM_SPE_LLC_MISS)) { data_src->mem_lvl = PERF_MEM_LVL_L3; if (record->type & ARM_SPE_LLC_MISS) data_src->...
[ 0, 0 ]
Linux Kernel
tools/perf/util/arm-spe.c
static int arm_spe_process_queues(struct arm_spe *spe, u64 timestamp) { unsigned int queue_nr; u64 ts; int ret; while (1) { struct auxtrace_queue *queue; struct arm_spe_queue *speq; if (!spe->heap.heap_cnt) return 0; if (spe->heap.heap_array[0].ordinal >= timestamp) return 0; ...
[ 0, 0 ]
Linux Kernel
tools/perf/util/arm-spe.c
static int arm_spe_flush(struct perf_session *session __maybe_unused, struct perf_tool *tool __maybe_unused) { struct arm_spe *spe = container_of(session->auxtrace, struct arm_spe, auxtrace); int ret; if (dump_trace) return 0; if (!tool->ordered_events) return -EINVAL; ...
[ 0, 0 ]
Linux Kernel
tools/perf/util/arm-spe.c
static int arm_spe_synth_event(struct perf_session *session, struct perf_event_attr *attr, u64 id) { struct arm_spe_synth arm_spe_synth; memset(&arm_spe_synth, 0, sizeof(struct arm_spe_synth)); arm_spe_synth.session = session; return perf_event__synthesize_attr(&arm_spe_synth.d...
[ 1, 0 ]
Linux Kernel
tools/perf/util/arm64-frame-pointer-unwind-support.c
static bool get_leaf_frame_caller_enabled(struct perf_sample *sample) { return callchain_param.record_mode == CALLCHAIN_FP && sample->user_regs.regs && sample->user_regs.mask & SMPL_REG_MASK(PERF_REG_ARM64_LR); }
[ 1, 0 ]
Linux Kernel
tools/perf/util/arm64-frame-pointer-unwind-support.c
static int add_entry(struct unwind_entry *entry, void *arg) { struct entries *entries = arg; entries->stack[entries->length++] = entry->ip; return 0; }
[ 1, 0 ]
Linux Kernel
tools/perf/util/auxtrace.c
static int evlist__regroup(struct evlist *evlist, struct evsel *leader, struct evsel *last) { struct evsel *evsel; bool grp; if (!evsel__is_group_leader(leader)) return -EINVAL; grp = false; evlist__for_each_entry(evlist, evsel) { if (grp) { if (!(evsel__leader(evsel...
[ 0, 0 ]
Linux Kernel
tools/perf/util/auxtrace.c
void auxtrace_mmap_params__init(struct auxtrace_mmap_params *mp, off_t auxtrace_offset, unsigned int auxtrace_pages, bool auxtrace_overwrite) { if (auxtrace_pages) { mp->offset = auxtrace_offset; mp->len = auxtrac...
[ 1, 0 ]
Linux Kernel
tools/perf/util/auxtrace.c
static int auxtrace_queues__grow(struct auxtrace_queues *queues, unsigned int new_nr_queues) { unsigned int nr_queues = queues->nr_queues; struct auxtrace_queue *queue_array; unsigned int i; if (!nr_queues) nr_queues = AUXTRACE_INIT_NR_QUEUES; while (nr_queues && nr_que...
[ 1, 0 ]
Linux Kernel
tools/perf/util/auxtrace.c
static bool filter_cpu(struct perf_session *session, struct perf_cpu cpu) { unsigned long *cpu_bitmap = session->itrace_synth_opts->cpu_bitmap; return cpu_bitmap && cpu.cpu != -1 && !test_bit(cpu.cpu, cpu_bitmap); }
[ 1, 0 ]
Linux Kernel
tools/perf/util/auxtrace.c
int auxtrace_heap__add(struct auxtrace_heap *heap, unsigned int queue_nr, u64 ordinal) { struct auxtrace_heap_item *heap_array; if (queue_nr >= heap->heap_sz) { unsigned int heap_sz = AUXTRACE_INIT_NR_QUEUES; while (heap_sz <= queue_nr) heap_sz <<= 1; heap_array = ...
[ 1, 0 ]
Linux Kernel
tools/perf/util/auxtrace.c
void auxtrace_heap__free(struct auxtrace_heap *heap) { zfree(&heap->heap_array); heap->heap_cnt = 0; heap->heap_sz = 0; }
[ 0, 0 ]
Linux Kernel
tools/perf/util/auxtrace.c
void auxtrace_heap__pop(struct auxtrace_heap *heap) { unsigned int pos, last, heap_cnt = heap->heap_cnt; struct auxtrace_heap_item *heap_array; if (!heap_cnt) return; heap->heap_cnt -= 1; heap_array = heap->heap_array; pos = 0; while (1) { unsigned int left, right; left = (pos << 1) + 1;...
[ 1, 0 ]
Linux Kernel
tools/perf/util/auxtrace.c
void auxtrace_record__free(struct auxtrace_record *itr) { if (itr) itr->free(itr); }
[ 0, 0 ]
Linux Kernel
tools/perf/util/auxtrace.c
int auxtrace_record__snapshot_finish(struct auxtrace_record *itr, bool on_exit) { if (!on_exit && itr && itr->snapshot_finish) return itr->snapshot_finish(itr); return 0; }
[ 1, 0 ]
Linux Kernel
tools/perf/util/auxtrace.c
int auxtrace_record__find_snapshot(struct auxtrace_record *itr, int idx, struct auxtrace_mmap *mm, unsigned char *data, u64 *head, u64 *old) { if (itr && itr->find_snapshot) return itr->find_snapshot(itr, idx, mm, data, head, old); return 0;...
[ 1, 0 ]
Linux Kernel
tools/perf/util/auxtrace.c
int auxtrace_parse_sample_options(struct auxtrace_record *itr, struct evlist *evlist, struct record_opts *opts, const char *str) { struct evsel_config_term *term; struct evsel *aux_evsel; bool has_aux_sample_size = false; bool has_aux_leader = ...
[ 1, 0 ]
Linux Kernel
tools/perf/util/auxtrace.c
void auxtrace_index__free(struct list_head *head) { struct auxtrace_index *auxtrace_index, *n; list_for_each_entry_safe(auxtrace_index, n, head, list) { list_del_init(&auxtrace_index->list); free(auxtrace_index); } }
[ 1, 0 ]
Linux Kernel
tools/perf/util/auxtrace.c
static int auxtrace_index__do_write(int fd, struct auxtrace_index *auxtrace_index) { struct auxtrace_index_entry ent; size_t i; for (i = 0; i < auxtrace_index->nr; i++) { ent.file_offset = auxtrace_index->entries[i].file_offset; ent.sz = auxtrace_index->entries[i].sz;...
[ 1, 0 ]
Linux Kernel
tools/perf/util/auxtrace.c
int auxtrace_index__write(int fd, struct list_head *head) { struct auxtrace_index *auxtrace_index; u64 total = 0; int err; list_for_each_entry(auxtrace_index, head, list) total += auxtrace_index->nr; if (writen(fd, &total, sizeof(total)) != sizeof(total)) return -errno; list_for_each_entry(auxtrace_...
[ 1, 0 ]
Linux Kernel
tools/perf/util/auxtrace.c
static int auxtrace_queues__process_index_entry(struct auxtrace_queues *queues, struct perf_session *session, struct auxtrace_index_entry *ent) { return auxtrace_queues__add_indexed_event(queues, session, ent->file_offset, ...
[ 0, 0 ]
Linux Kernel
tools/perf/util/auxtrace.c
struct auxtrace_queue * auxtrace_queues__sample_queue(struct auxtrace_queues *queues, struct perf_sample *sample, struct perf_session *session) { struct perf_sample_id *sid; unsigned int idx; u64 id; id = sample->id; if (!id) return NULL; si...
[ 0, 0 ]
Linux Kernel
tools/perf/util/auxtrace.c
void auxtrace_buffer__free(struct auxtrace_buffer *buffer) { auxtrace_buffer__drop_data(buffer); free(buffer); }
[ 1, 0 ]
Linux Kernel
tools/perf/util/auxtrace.c
void auxtrace_synth_error(struct perf_record_auxtrace_error *auxtrace_error, int type, int code, int cpu, pid_t pid, pid_t tid, u64 ip, const char *msg, u64 timestamp) { auxtrace_synth_guest_error(auxtrace_error, type, code, cpu, pid, tid, ip, msg, ...
[ 0, 0 ]
Linux Kernel
tools/perf/util/auxtrace.c
int perf_event__process_auxtrace_info(struct perf_session *session, union perf_event *event) { enum auxtrace_type type = event->auxtrace_info.type; int err; if (dump_trace) fprintf(stdout, " type: %u\n", type); switch (type) { case PERF_AUXTRACE_INTEL_PT: err =...
[ 0, 0 ]
Linux Kernel
tools/perf/util/auxtrace.c
static int get_flag(const char **ptr, unsigned int *flags) { while (1) { char c = **ptr; if (c >= 'a' && c <= 'z') { *flags |= 1 << (c - 'a'); ++*ptr; return 0; } else if (c == ' ') { ++*ptr; continue; } else { return -1; } } }
[ 1, 0 ]
Linux Kernel
tools/perf/util/auxtrace.c
struct auxtrace_cache *auxtrace_cache__new(unsigned int bits, size_t entry_size, unsigned int limit_percent) { struct auxtrace_cache *c; struct hlist_head *ht; size_t sz, i; c = zalloc(sizeof(struct auxtrace_cache)); if (!c) return NULL; sz = 1UL << bits; ...
[ 1, 0 ]
Linux Kernel
tools/perf/util/auxtrace.c
void auxtrace_cache__free(struct auxtrace_cache *c) { if (!c) return; auxtrace_cache__drop(c); zfree(&c->hashtable); free(c); }
[ 1, 0 ]
Linux Kernel
tools/perf/util/auxtrace.c
static struct addr_filter *addr_filter__new(void) { struct addr_filter *filt = zalloc(sizeof(*filt)); if (filt) INIT_LIST_HEAD(&filt->list); return filt; }
[ 0, 0 ]
Linux Kernel
tools/perf/util/auxtrace.c
static void addr_filters__add(struct addr_filters *filts, struct addr_filter *filt) { list_add_tail(&filt->list, &filts->head); filts->cnt += 1; }
[ 0, 0 ]
Linux Kernel
tools/perf/util/auxtrace.c
static int parse_num_or_str(char **inp, u64 *num, const char **str, const char *str_delim) { *inp += strspn(*inp, " "); if (isdigit(**inp)) { char *endptr; if (!num) return -EINVAL; errno = 0; *num = strtoull(*inp, &endptr, 0); if (errno) return -errno;...
[ 0, 0 ]
Linux Kernel
tools/perf/util/auxtrace.c
static int parse_sym_idx(char **inp, int *idx) { *idx = -1; *inp += strspn(*inp, " "); if (**inp != '#') return 0; *inp += 1; if (**inp == 'g' || **inp == 'G') { *inp += 1; *idx = 0; } else { unsigned long num; char *endptr; errno = 0; num = strtoul(*inp, &endptr, 0); i...
[ 0, 0 ]
Linux Kernel
tools/perf/util/auxtrace.c
int addr_filters__parse_bare_filter(struct addr_filters *filts, const char *filter) { struct addr_filter *filt; const char *fstr = filter; int err; while (*fstr) { filt = addr_filter__new(); err = parse_one_filter(filt, &fstr); if (err) { addr_filter__free...
[ 0, 0 ]
Linux Kernel
tools/perf/util/auxtrace.c
static bool kern_sym_name_match(const char *kname, const char *name) { size_t n = strlen(name); return !strcmp(kname, name) || (!strncmp(kname, name, n) && kname[n] == '\t'); }
[ 0, 0 ]
Linux Kernel
tools/perf/util/auxtrace.c
static int find_entire_kern_cb(void *arg, const char *name __maybe_unused, char type, u64 start) { struct sym_args *args = arg; if (!kallsyms__is_function(type)) return 0; if (!args->started) { args->started = true; args->start = start; } args->size = round_up(sta...
[ 0, 0 ]
Linux Kernel
tools/perf/util/auxtrace.c
static int addr_filter__resolve_kernel_syms(struct addr_filter *filt) { bool no_size = false; u64 start, size; int err; if (symbol_conf.kptr_restrict) { pr_err( "Kernel addresses are restricted. Unable to resolve kernel symbols.\n"); return -EINVAL; } if (filt->sym_from && !strcmp(filt->sy...
[ 0, 0 ]
Linux Kernel
tools/perf/util/auxtrace.c
static bool dso_sym_match(struct symbol *sym, const char *name, int *cnt, int idx) { return !arch__compare_symbol_names(name, sym->name) && ((!idx && sym->binding == STB_GLOBAL) || (idx > 0 && ++*cnt == idx) || idx < 0); }
[ 1, 0 ]
Linux Kernel
tools/perf/util/auxtrace.c
static char *addr_filter__to_str(struct addr_filter *filt) { char filename_buf[PATH_MAX]; const char *at = ""; const char *fn = ""; char *filter; int err; if (filt->filename) { at = "@"; fn = realpath(filt->filename, filename_buf); if (!fn) return NULL; } if (filt->range) { err ...
[ 0, 0 ]
Linux Kernel
tools/perf/util/auxtrace.c
void auxtrace__free(struct perf_session *session) { if (!session->auxtrace) return; return session->auxtrace->free(session); }
[ 0, 0 ]
Linux Kernel
tools/perf/util/auxtrace.h
static inline void itrace_synth_opts__clear_time_range(struct itrace_synth_opts *opts) { opts->ptime_range = NULL; opts->range_num = 0; }
[ 0, 0 ]
Linux Kernel
tools/perf/util/auxtrace.h
static inline struct auxtrace_record * auxtrace_record__init(struct evlist *evlist __maybe_unused, int *err) { *err = 0; return NULL; }
[ 0, 0 ]
Linux Kernel
tools/perf/util/auxtrace.h
static inline int perf_event__process_auxtrace_error(struct perf_session *session __maybe_unused, union perf_event *event __maybe_unused) { return 0; }
[ 0, 0 ]
Linux Kernel
tools/perf/util/auxtrace.h
static inline void events_stats__auxtrace_error_warn( const struct events_stats *stats __maybe_unused) {}
[ 0, 0 ]
Linux Kernel
tools/perf/util/auxtrace.h
static inline int itrace_do_parse_synth_opts(struct itrace_synth_opts *synth_opts __maybe_unused, const char *str __maybe_unused, int unset __maybe_unused) { pr_err("AUX area tracing not supported\n"); return -EINVAL; }
[ 0, 0 ]
Linux Kernel
tools/perf/util/auxtrace.h
static inline void auxtrace_regroup_aux_output(struct evlist *evlist __maybe_unused) {}
[ 0, 0 ]
Linux Kernel
tools/perf/util/auxtrace.h
static inline int auxtrace__process_event(struct perf_session *session __maybe_unused, union perf_event *event __maybe_unused, struct perf_sample *sample __maybe_unused, struct perf_tool *tool __maybe_unused) { return 0; }
[ 0, 0 ]
Linux Kernel
tools/perf/util/auxtrace.h
static inline int auxtrace_parse_filters(struct evlist *evlist __maybe_unused) { return 0; }
[ 0, 0 ]
Linux Kernel
tools/perf/util/block-info.c
struct block_info *block_info__new(void) { struct block_info *bi = zalloc(sizeof(*bi)); if (bi) refcount_set(&bi->refcnt, 1); return bi; }
[ 0, 0 ]
Linux Kernel
tools/perf/util/block-info.c
int64_t __block_info__cmp(struct hist_entry *left, struct hist_entry *right) { struct block_info *bi_l = left->block_info; struct block_info *bi_r = right->block_info; int cmp; if (!bi_l->sym || !bi_r->sym) { if (!bi_l->sym && !bi_r->sym) return -1; else if (!bi_l->sym) return -1; else...
[ 1, 0 ]
Linux Kernel
tools/perf/util/block-info.c
static int block_column_header(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, struct hists *hists __maybe_unused, int line __maybe_unused, int *span __maybe_unused) { struct block_fmt *block_fmt = container_of(fmt, struct b...
[ 0, 0 ]
Linux Kernel
tools/perf/util/block-info.c
static int block_range_entry(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, struct hist_entry *he) { struct block_fmt *block_fmt = container_of(fmt, struct block_fmt, fmt); struct block_info *bi = he->block_info; char buf[128]; char *start_line, *end_line; symbol_conf.disable_a...
[ 1, 0 ]
Linux Kernel
tools/perf/util/block-info.c
static void hpp_register(struct block_fmt *block_fmt, int idx, struct perf_hpp_list *hpp_list) { struct perf_hpp_fmt *fmt = &block_fmt->fmt; block_fmt->idx = idx; INIT_LIST_HEAD(&fmt->list); INIT_LIST_HEAD(&fmt->sort_list); switch (idx) { case PERF_HPP_REPORT__BLOCK_TOTAL_CYCLES_...
[ 0, 0 ]
Linux Kernel
tools/perf/util/block-info.c
static void register_block_columns(struct perf_hpp_list *hpp_list, struct block_fmt *block_fmts, int *block_hpps, int nr_hpps) { for (int i = 0; i < nr_hpps; i++) hpp_register(&block_fmts[i], block_hpps[i], hpp_list); }
[ 0, 0 ]
Linux Kernel
tools/perf/util/block-info.c
static int process_block_report(struct hists *hists, struct block_report *block_report, u64 total_cycles, int *block_hpps, int nr_hpps) { struct rb_node *next = rb_first_cached(&hists->entries); struct block_hist *bh = ...
[ 0, 0 ]
Linux Kernel
tools/perf/util/block-info.c
void block_info__free_report(struct block_report *reps, int nr_reps) { for (int i = 0; i < nr_reps; i++) hists__delete_entries(&reps[i].hist.block_hists); free(reps); }
[ 1, 0 ]
Linux Kernel
tools/perf/util/block-info.c
float block_info__total_cycles_percent(struct hist_entry *he) { struct block_info *bi = he->block_info; if (bi->total_cycles) return bi->cycles * 100.0 / bi->total_cycles; return 0.0; }
[ 0, 0 ]
Linux Kernel
tools/perf/util/block-range.h
static inline bool block_range_iter__valid(struct block_range_iter *iter) { if (!iter->start || !iter->end) return false; return true; }
[ 0, 0 ]
Linux Kernel
tools/perf/util/bpf-event.c
struct bpf_map *bpf_object__next_map(const struct bpf_object *obj, const struct bpf_map *prev) { #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" return bpf_map__next(prev, obj); #pragma GCC diagnostic pop }
[ 0, 0 ]
Linux Kernel
tools/perf/util/bpf-event.c
static int snprintf_hex(char *buf, size_t size, unsigned char *data, size_t len) { int ret = 0; size_t i; for (i = 0; i < len; i++) ret += snprintf(buf + ret, size - ret, "%02x", data[i]); return ret; }
[ 1, 0 ]
Linux Kernel
tools/perf/util/bpf-event.c
int machine__process_bpf(struct machine *machine, union perf_event *event, struct perf_sample *sample) { if (dump_trace) perf_event__fprintf_bpf(event, stdout); switch (event->bpf.type) { case PERF_BPF_EVENT_PROG_LOAD: return machine__process_bpf_event_load(machine, event, sample...
[ 0, 0 ]
Linux Kernel
tools/perf/util/bpf-event.c
int perf_event__synthesize_bpf_events(struct perf_session *session, perf_event__handler_t process, struct machine *machine, struct record_opts *opts) { const char *kallsyms_filename = "/proc/kallsyms"; ...
[ 1, 0 ]
Linux Kernel
tools/perf/util/bpf-event.c
int evlist__add_bpf_sb_event(struct evlist *evlist, struct perf_env *env) { struct perf_event_attr attr = { .type = PERF_TYPE_SOFTWARE, .config = PERF_COUNT_SW_DUMMY, .sample_id_all = 1, .watermark = 1, .bpf_event = 1, .size = sizeof(attr), }; /* * Older gcc versions don't ...
[ 1, 0 ]
Linux Kernel
tools/perf/util/bpf-loader.c
static int bpf_perf_object__add(struct bpf_object *obj) { struct bpf_perf_object *perf_obj = zalloc(sizeof(*perf_obj)); if (perf_obj) { INIT_LIST_HEAD(&perf_obj->list); perf_obj->obj = obj; list_add_tail(&perf_obj->list, &bpf_objects_list); } return perf_obj ? 0 : -ENOMEM; }
[ 0, 0 ]
Linux Kernel
tools/perf/util/bpf-loader.c
static void clear_prog_priv(const struct bpf_program *prog __maybe_unused, void *_priv) { struct bpf_prog_priv *priv = _priv; close_prologue_programs(priv); cleanup_perf_probe_events(&priv->pev, 1); zfree(&priv->insns_buf); zfree(&priv->prologue_fds); zfree(&priv->type_mapping)...
[ 1, 0 ]
Linux Kernel
tools/perf/util/bpf-loader.c
static int program_set_priv(struct bpf_program *prog, void *priv) { void *old_priv; if (IS_ERR(bpf_program_hash)) return PTR_ERR(bpf_program_hash); if (!bpf_program_hash) { bpf_program_hash = hashmap__new(ptr_hash, ptr_equal, NULL); if (IS_ERR(bpf_program_hash)) return PTR_ERR(bpf_program_hash...
[ 0, 0 ]
Linux Kernel
tools/perf/util/bpf-loader.c
static int prog_config__module(const char *value, struct perf_probe_event *pev) { pev->uprobes = false; pev->target = strdup(value); if (!pev->target) return -ENOMEM; return 0; }
[ 0, 0 ]
Linux Kernel
tools/perf/util/bpf-loader.c
static int do_prog_config(const char *key, const char *value, struct perf_probe_event *pev) { unsigned int i; pr_debug("config bpf program: %s=%s\n", key, value); for (i = 0; i < ARRAY_SIZE(bpf_prog_config_terms); i++) if (strcmp(key, bpf_prog_config_terms[i].key) == 0) retur...
[ 0, 0 ]