• Home
  • Raw
  • Download

Lines Matching +full:- +full:- +full:depth

3 # offwaketime   Summarize blocked time by kernel off-CPU stack + waker stack
6 # USAGE: offwaketime [-h] [-u] [-p PID] [-T] [duration]
12 # The Off-CPU stack is currently limited to a stack trace depth of 20
20 # 20-Jan-2016 Brendan Gregg Created this.
30 ./offwaketime # trace off-CPU + waker stack time until Ctrl-C
32 ./offwaketime -f 5 # 5 seconds, and output in folded format
33 ./offwaketime -u # don't include kernel threads (user only)
34 ./offwaketime -p 185 # trace fo PID 185 only
40 parser.add_argument("-u", "--useronly", action="store_true",
42 parser.add_argument("-p", "--pid",
44 parser.add_argument("-v", "--verbose", action="store_true",
46 parser.add_argument("-f", "--folded", action="store_true",
57 print("ERROR: use either -p or -u.")
103 u32 pid = p->pid;
110 int depth = 0;
112 bp = ctx->bp;
115 if (!(woke.ret[depth++] = get_frame(&bp))) goto out;
116 if (!(woke.ret[depth++] = get_frame(&bp))) goto out;
117 if (!(woke.ret[depth++] = get_frame(&bp))) goto out;
118 if (!(woke.ret[depth++] = get_frame(&bp))) goto out;
119 if (!(woke.ret[depth++] = get_frame(&bp))) goto out;
120 if (!(woke.ret[depth++] = get_frame(&bp))) goto out;
121 if (!(woke.ret[depth++] = get_frame(&bp))) goto out;
122 if (!(woke.ret[depth++] = get_frame(&bp))) goto out;
123 if (!(woke.ret[depth++] = get_frame(&bp))) goto out;
124 woke.ret[depth] = get_frame(&bp);
132 u32 pid = p->pid;
146 u64 delta = bpf_ktime_get_ns() - *tsp;
154 int depth = 0;
158 bp = ctx->bp;
161 if (!(key.tret[depth++] = get_frame(&bp))) goto out;
162 if (!(key.tret[depth++] = get_frame(&bp))) goto out;
163 if (!(key.tret[depth++] = get_frame(&bp))) goto out;
164 if (!(key.tret[depth++] = get_frame(&bp))) goto out;
165 if (!(key.tret[depth++] = get_frame(&bp))) goto out;
166 if (!(key.tret[depth++] = get_frame(&bp))) goto out;
167 if (!(key.tret[depth++] = get_frame(&bp))) goto out;
168 if (!(key.tret[depth++] = get_frame(&bp))) goto out;
169 if (!(key.tret[depth++] = get_frame(&bp))) goto out;
170 if (!(key.tret[depth++] = get_frame(&bp))) goto out;
172 if (!(key.tret[depth++] = get_frame(&bp))) goto out;
173 if (!(key.tret[depth++] = get_frame(&bp))) goto out;
174 if (!(key.tret[depth++] = get_frame(&bp))) goto out;
175 if (!(key.tret[depth++] = get_frame(&bp))) goto out;
176 if (!(key.tret[depth++] = get_frame(&bp))) goto out;
177 if (!(key.tret[depth++] = get_frame(&bp))) goto out;
178 if (!(key.tret[depth++] = get_frame(&bp))) goto out;
179 if (!(key.tret[depth++] = get_frame(&bp))) goto out;
180 if (!(key.tret[depth++] = get_frame(&bp))) goto out;
181 key.tret[depth] = get_frame(&bp);
186 __builtin_memcpy(&key.wret, woke->ret, sizeof(key.wret));
187 __builtin_memcpy(&key.waker, woke->name, TASK_COMM_LEN);
201 filter = '!(p->flags & PF_KTHREAD)'
219 print("Tracing blocked time (us) by kernel off-CPU and waker stack",
224 print("... Hit Ctrl-C to end.")
231 # as cleanup can take many seconds, trap Ctrl-C:
249 line = line + ";-"
264 print(" %-16s %s" % ("waker:", k.waker))
268 print(" %-16x %s" % (k.wret[i],
272 print(" %-16s %s" % ("-", "-"))
274 # print default multi-line stack output
278 print(" %-16x %s" % (k.tret[i],
280 print(" %-16s %s" % ("target:", k.target))