Lines Matching defs:sample
43 * @ref: external reference (e.g. db_id of sample)
561 * Hardware sample records, created some time after the event occurred, need to
675 * Hardware sample records, created some time after the event occurred, need to
705 * User space sample: start copying branch entries when the
727 * Kernel space sample: start copying branch entries when the ip
860 struct perf_sample *sample,
869 if (sample->ip) {
870 ip = sample->ip;
872 } else if (sample->addr) {
873 ip = sample->addr;
882 return thread_stack__push_cp(ts, ip, sample->time, ref, cp,
887 struct perf_sample *sample, u64 ref)
889 u64 tm = sample->time;
905 struct perf_sample *sample,
915 u64 addr = sample->addr;
916 u64 tm = sample->time;
917 u64 ip = sample->ip;
922 err = thread_stack__pop_ks(thread, ts, sample, ref);
934 err = thread_stack__pop_ks(thread, ts, sample, ref);
1020 struct perf_sample *sample, u64 ref)
1033 ret_addr = sample->ip + sample->insn_len;
1035 return thread_stack__push_cp(ts, ret_addr, sample->time, ref, cp,
1050 struct perf_sample *sample,
1091 sample->addr, ts->kernel_start);
1102 struct perf_sample *sample,
1107 struct thread_stack *ts = thread__stack(thread, sample->cpu);
1118 ts = thread_stack__new(thread, sample->cpu, crp, true, 0);
1138 err = thread_stack__bottom(ts, sample, from_al, to_al, ref);
1144 ts->insn_count += sample->insn_cnt;
1145 ts->cyc_count += sample->cyc_cnt;
1146 ts->last_time = sample->time;
1148 if (sample->flags & PERF_IP_FLAG_CALL) {
1149 bool trace_end = sample->flags & PERF_IP_FLAG_TRACE_END;
1154 if (!sample->ip || !sample->addr)
1157 ret_addr = sample->ip + sample->insn_len;
1158 if (ret_addr == sample->addr)
1162 to_al->sym, sample->addr,
1164 err = thread_stack__push_cp(ts, ret_addr, sample->time, ref,
1176 } else if (sample->flags & PERF_IP_FLAG_RETURN) {
1177 if (!sample->addr) {
1181 if (!(sample->flags & return_from_kernel))
1185 return thread_stack__pop_ks(thread, ts, sample, ref);
1188 if (!sample->ip)
1193 ts->stack[ts->cnt - 1].ret_addr != sample->addr)
1194 return thread_stack__x86_retpoline(ts, sample, to_al);
1196 err = thread_stack__pop_cp(thread, ts, sample->addr,
1197 sample->time, ref, from_al->sym);
1201 err = thread_stack__no_call_return(thread, ts, sample,
1204 } else if (sample->flags & PERF_IP_FLAG_TRACE_BEGIN) {
1205 err = thread_stack__trace_begin(thread, ts, sample->time, ref);
1206 } else if (sample->flags & PERF_IP_FLAG_TRACE_END) {
1207 err = thread_stack__trace_end(ts, sample, ref);
1208 } else if (sample->flags & PERF_IP_FLAG_BRANCH &&
1221 to_al->sym, sample->addr,
1223 err = thread_stack__push_cp(ts, 0, sample->time, ref, cp, false,