Lines Matching refs:cnt

71  * @cnt: number of entries in the stack
90 size_t cnt;
243 if (ts->cnt == ts->sz) {
247 ts->cnt = 0;
251 ts->stack[ts->cnt].trace_end = trace_end;
252 ts->stack[ts->cnt++].ret_addr = ret_addr;
270 for (i = ts->cnt; i; ) {
272 ts->cnt = i;
282 for (i = ts->cnt; i; ) {
284 ts->cnt = i;
292 if (!ts->cnt)
295 return ts->stack[ts->cnt - 1].cp->in_kernel;
344 ts->cnt = 0;
351 while (ts->cnt) {
352 err = thread_stack__call_return(thread, ts, --ts->cnt,
356 ts->cnt = 0;
545 for (i = 2, j = 1; i < sz && j <= ts->cnt; i++, j++) {
546 ip = ts->stack[ts->cnt - j].ret_addr;
586 for (j = 1; j <= ts->cnt; j++) {
587 ip = ts->stack[ts->cnt - j].ret_addr;
596 for (; nr < sz && j <= ts->cnt; nr++, j++) {
597 ip = ts->stack[ts->cnt - j].ret_addr;
792 if (ts->cnt == ts->sz) {
798 tse = &ts->stack[ts->cnt++];
820 if (!ts->cnt)
823 if (ts->cnt == 1) {
827 return thread_stack__call_return(thread, ts, --ts->cnt,
831 if (ts->stack[ts->cnt - 1].ret_addr == ret_addr &&
832 !ts->stack[ts->cnt - 1].non_call) {
833 return thread_stack__call_return(thread, ts, --ts->cnt,
836 size_t i = ts->cnt - 1;
843 while (ts->cnt > i) {
845 --ts->cnt,
851 return thread_stack__call_return(thread, ts, --ts->cnt,
894 err = thread_stack__call_return(thread, ts, --ts->cnt,
927 if (!ts->cnt) {
939 if (ts->cnt)
940 parent = ts->stack[ts->cnt - 1].cp;
950 if (ts->cnt == 1) {
951 err = thread_stack__call_return(thread, ts, --ts->cnt,
957 if (!ts->cnt) {
972 ts->stack[ts->cnt - 1].non_call = true;
994 return thread_stack__call_return(thread, ts, --ts->cnt, tm, ref, false);
1004 if (!ts->cnt)
1008 tse = &ts->stack[ts->cnt - 1];
1010 err = thread_stack__call_return(thread, ts, --ts->cnt,
1027 if (!ts->cnt || (ts->cnt == 1 && ts->stack[0].ref == ref))
1030 cp = call_path__findnew(cpr, ts->stack[ts->cnt - 1].cp, NULL, 0,
1053 struct thread_stack_entry *tse = &ts->stack[ts->cnt - 1];
1070 ts->cnt -= 1;
1071 sym = ts->stack[ts->cnt - 2].cp->sym;
1078 ts->cnt -= 1;
1086 ts->cnt -= 1;
1090 cp = call_path__findnew(cpr, ts->stack[ts->cnt - 2].cp, tsym,
1096 ts->stack[ts->cnt - 1].cp = cp;
1137 if (!ts->cnt) {
1161 cp = call_path__findnew(cpr, ts->stack[ts->cnt - 1].cp,
1192 if (rstate == X86_RETPOLINE_DETECTED && ts->cnt > 2 &&
1193 ts->stack[ts->cnt - 1].ret_addr != sample->addr)
1220 cp = call_path__findnew(cpr, ts->stack[ts->cnt - 1].cp,
1226 ts->stack[ts->cnt - 1].non_call = true;
1238 return ts->cnt;