Lines Matching full:sample

418 static PyObject *python_process_callchain(struct perf_sample *sample,  in python_process_callchain()  argument
429 if (!symbol_conf.use_callchain || !sample->callchain) in python_process_callchain()
434 sample, NULL, NULL, in python_process_callchain()
510 static PyObject *python_process_brstack(struct perf_sample *sample, in python_process_brstack() argument
513 struct branch_stack *br = sample->branch_stack; in python_process_brstack()
514 struct branch_entry *entries = perf_sample__branch_entries(sample); in python_process_brstack()
550 thread__find_map_fb(thread, sample->cpumode, in python_process_brstack()
556 thread__find_map_fb(thread, sample->cpumode, in python_process_brstack()
598 static PyObject *python_process_brstacksym(struct perf_sample *sample, in python_process_brstacksym() argument
601 struct branch_stack *br = sample->branch_stack; in python_process_brstacksym()
602 struct branch_entry *entries = perf_sample__branch_entries(sample); in python_process_brstacksym()
623 thread__find_symbol_fb(thread, sample->cpumode, in python_process_brstacksym()
629 thread__find_symbol_fb(thread, sample->cpumode, in python_process_brstacksym()
681 struct perf_sample *sample, in set_sample_read_in_dict() argument
690 PyLong_FromUnsignedLongLong(sample->read.time_enabled)); in set_sample_read_in_dict()
695 PyLong_FromUnsignedLongLong(sample->read.time_running)); in set_sample_read_in_dict()
699 values = PyList_New(sample->read.group.nr); in set_sample_read_in_dict()
707 struct sample_read_value *v = sample->read.group.values; in set_sample_read_in_dict()
710 sample_read_group__for_each(v, sample->read.group.nr, read_format) { in set_sample_read_in_dict()
716 PyObject *t = get_sample_value_as_tuple(&sample->read.one, in set_sample_read_in_dict()
724 struct perf_sample *sample) in set_sample_datasrc_in_dict() argument
733 PyLong_FromUnsignedLongLong(sample->data_src)); in set_sample_datasrc_in_dict()
735 mem_info__data_src(mi)->val = sample->data_src; in set_sample_datasrc_in_dict()
768 struct perf_sample *sample, in set_regs_in_dict() argument
779 regs_map(&sample->intr_regs, attr->sample_regs_intr, arch, bf, size); in set_regs_in_dict()
784 regs_map(&sample->user_regs, attr->sample_regs_user, arch, bf, size); in set_regs_in_dict()
834 static void python_process_sample_flags(struct perf_sample *sample, PyObject *dict_sample) in python_process_sample_flags() argument
838 set_sample_flags(dict_sample, sample->flags); in python_process_sample_flags()
839 perf_sample__sprintf_flags(sample->flags, flags_disp, sizeof(flags_disp)); in python_process_sample_flags()
844 static PyObject *get_perf_sample_dict(struct perf_sample *sample, in get_perf_sample_dict() argument
864 PyLong_FromUnsignedLongLong(sample->id)); in get_perf_sample_dict()
866 PyLong_FromUnsignedLongLong(sample->stream_id)); in get_perf_sample_dict()
868 _PyLong_FromLong(sample->pid)); in get_perf_sample_dict()
870 _PyLong_FromLong(sample->tid)); in get_perf_sample_dict()
872 _PyLong_FromLong(sample->cpu)); in get_perf_sample_dict()
874 PyLong_FromUnsignedLongLong(sample->ip)); in get_perf_sample_dict()
876 PyLong_FromUnsignedLongLong(sample->time)); in get_perf_sample_dict()
878 PyLong_FromUnsignedLongLong(sample->period)); in get_perf_sample_dict()
880 PyLong_FromUnsignedLongLong(sample->phys_addr)); in get_perf_sample_dict()
882 PyLong_FromUnsignedLongLong(sample->addr)); in get_perf_sample_dict()
883 set_sample_read_in_dict(dict_sample, sample, evsel); in get_perf_sample_dict()
885 PyLong_FromUnsignedLongLong(sample->weight)); in get_perf_sample_dict()
887 PyLong_FromUnsignedLong(sample->ins_lat)); in get_perf_sample_dict()
889 PyLong_FromUnsignedLongLong(sample->transaction)); in get_perf_sample_dict()
890 set_sample_datasrc_in_dict(dict_sample, sample); in get_perf_sample_dict()
891 pydict_set_item_string_decref(dict, "sample", dict_sample); in get_perf_sample_dict()
894 (const char *)sample->raw_data, sample->raw_size)); in get_perf_sample_dict()
902 brstack = python_process_brstack(sample, al->thread); in get_perf_sample_dict()
905 brstacksym = python_process_brstacksym(sample, al->thread); in get_perf_sample_dict()
908 if (sample->machine_pid) { in get_perf_sample_dict()
910 _PyLong_FromLong(sample->machine_pid)); in get_perf_sample_dict()
912 _PyLong_FromLong(sample->vcpu)); in get_perf_sample_dict()
916 _PyLong_FromLong((unsigned long)sample->cpumode)); in get_perf_sample_dict()
926 if (sample->flags) in get_perf_sample_dict()
927 python_process_sample_flags(sample, dict_sample); in get_perf_sample_dict()
930 if (sample->insn_cnt && sample->cyc_cnt) { in get_perf_sample_dict()
932 PyLong_FromUnsignedLongLong(sample->insn_cnt)); in get_perf_sample_dict()
934 PyLong_FromUnsignedLongLong(sample->cyc_cnt)); in get_perf_sample_dict()
937 if (set_regs_in_dict(dict, sample, evsel)) in get_perf_sample_dict()
944 static void python_process_tracepoint(struct perf_sample *sample, in python_process_tracepoint() argument
957 int cpu = sample->cpu; in python_process_tracepoint()
958 void *data = sample->raw_data; in python_process_tracepoint()
959 unsigned long long nsecs = sample->time; in python_process_tracepoint()
1003 callchain = python_process_callchain(sample, evsel, al); in python_process_tracepoint()
1059 all_entries_dict = get_perf_sample_dict(sample, evsel, al, addr_al, in python_process_tracepoint()
1077 static void python_process_tracepoint(struct perf_sample *sample __maybe_unused, in python_process_tracepoint()
1327 tuple_set_d64(t, 8, es->sample->ip); in python_export_sample_table()
1328 tuple_set_d64(t, 9, es->sample->time); in python_export_sample_table()
1329 tuple_set_s32(t, 10, es->sample->cpu); in python_export_sample_table()
1333 tuple_set_d64(t, 14, es->sample->addr); in python_export_sample_table()
1334 tuple_set_d64(t, 15, es->sample->period); in python_export_sample_table()
1335 tuple_set_d64(t, 16, es->sample->weight); in python_export_sample_table()
1336 tuple_set_d64(t, 17, es->sample->transaction); in python_export_sample_table()
1337 tuple_set_d64(t, 18, es->sample->data_src); in python_export_sample_table()
1338 tuple_set_s32(t, 19, es->sample->flags & PERF_BRANCH_MASK); in python_export_sample_table()
1339 tuple_set_s32(t, 20, !!(es->sample->flags & PERF_IP_FLAG_IN_TX)); in python_export_sample_table()
1341 tuple_set_d64(t, 22, es->sample->insn_cnt); in python_export_sample_table()
1342 tuple_set_d64(t, 23, es->sample->cyc_cnt); in python_export_sample_table()
1343 tuple_set_s32(t, 24, es->sample->flags); in python_export_sample_table()
1344 tuple_set_d64(t, 25, es->sample->id); in python_export_sample_table()
1345 tuple_set_d64(t, 26, es->sample->stream_id); in python_export_sample_table()
1346 tuple_set_u32(t, 27, es->sample->ins_lat); in python_export_sample_table()
1362 tuple_set_bytes(t, 2, es->sample->raw_data, es->sample->raw_size); in python_export_synth()
1438 struct perf_sample *sample, in python_export_context_switch() argument
1449 tuple_set_d64(t, 2, sample->time); in python_export_context_switch()
1450 tuple_set_s32(t, 3, sample->cpu); in python_export_context_switch()
1472 static void python_process_general_event(struct perf_sample *sample, in python_process_general_event() argument
1496 callchain = python_process_callchain(sample, evsel, al); in python_process_general_event()
1497 dict = get_perf_sample_dict(sample, evsel, al, addr_al, callchain); in python_process_general_event()
1509 struct perf_sample *sample, in python_process_event() argument
1516 scripting_context__update(scripting_context, event, sample, evsel, al, addr_al); in python_process_event()
1520 python_process_tracepoint(sample, evsel, al, addr_al); in python_process_event()
1525 db_export__sample(&tables->dbe, event, sample, evsel, al, addr_al); in python_process_event()
1527 python_process_general_event(sample, evsel, al, addr_al); in python_process_event()
1532 struct perf_sample *sample, in python_process_throttle() argument
1553 tuple_set_s32(t, 3, sample->cpu); in python_process_throttle()
1554 tuple_set_s32(t, 4, sample->pid); in python_process_throttle()
1555 tuple_set_s32(t, 5, sample->tid); in python_process_throttle()
1563 struct perf_sample *sample, in python_do_process_switch() argument
1585 tuple_set_u64(t, 0, sample->time); in python_do_process_switch()
1586 tuple_set_s32(t, 1, sample->cpu); in python_do_process_switch()
1587 tuple_set_s32(t, 2, sample->pid); in python_do_process_switch()
1588 tuple_set_s32(t, 3, sample->tid); in python_do_process_switch()
1594 tuple_set_s32(t, 9, sample->machine_pid); in python_do_process_switch()
1595 tuple_set_s32(t, 10, sample->vcpu); in python_do_process_switch()
1603 struct perf_sample *sample, in python_process_switch() argument
1609 db_export__switch(&tables->dbe, event, sample, machine); in python_process_switch()
1611 python_do_process_switch(event, sample, machine); in python_process_switch()
1888 SET_TABLE_HANDLER(sample); in set_table_handlers()
1895 * stored in sample->raw_data. They are exported via in set_table_handlers()
2180 fprintf(ofp, "\t\tprint('Sample: {'+" in python_generate_script()
2181 "get_dict_as_string(perf_sample_dict['sample'], ', ')+'}')\n\n"); in python_generate_script()
2200 fprintf(ofp, "\t\tprint('Sample: {'+" in python_generate_script()
2201 "get_dict_as_string(perf_sample_dict['sample'], ', ')+'}')\n\n"); in python_generate_script()