MCPcopy Create free account
hub / github.com/iovisor/bcc / next

Method next

src/python/bcc/table.py:1184–1201  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1182 return self.next()
1183
1184 def next(self):
1185 self.n += 1
1186 if self.n == StackTrace.MAX_DEPTH:
1187 raise StopIteration()
1188
1189 if self.flags & StackTrace.BPF_F_STACK_BUILD_ID:
1190 addr = self.stack.trace[self.n]
1191 if addr.status == StackTrace.BPF_STACK_BUILD_ID_IP or \
1192 addr.status == StackTrace.BPF_STACK_BUILD_ID_EMPTY:
1193 raise StopIteration()
1194 else:
1195 addr = self.stack.ip[self.n]
1196
1197 # powerpc populates optional, potentially-null second and third entries
1198 if addr == 0 and (not platform.machine().startswith('ppc') or (self.n != 1 and self.n != 2)) :
1199 raise StopIteration()
1200
1201 return self.resolve(addr) if self.resolve else addr
1202
1203 def walk(self, stack_id, resolve=None):
1204 return StackTrace.StackWalker(self[self.Key(stack_id)], self.flags, resolve)

Callers 1

__next__Method · 0.95

Calls 1

resolveMethod · 0.80

Tested by

no test coverage detected