(self)
| 1467 | call_re = re.compile(r'^\s+(?P<address>[0-9a-fA-F]+)\s+(?P<symbol>.*)\s+\((?P<module>[^)]*)\)$') |
| 1468 | |
| 1469 | def parse_call(self): |
| 1470 | line = self.consume() |
| 1471 | mo = self.call_re.match(line) |
| 1472 | assert mo |
| 1473 | if not mo: |
| 1474 | return None |
| 1475 | |
| 1476 | function_name = mo.group('symbol') |
| 1477 | if not function_name: |
| 1478 | function_name = mo.group('address') |
| 1479 | |
| 1480 | module = mo.group('module') |
| 1481 | |
| 1482 | function_id = function_name + ':' + module |
| 1483 | |
| 1484 | try: |
| 1485 | function = self.profile.functions[function_id] |
| 1486 | except KeyError: |
| 1487 | function = Function(function_id, function_name) |
| 1488 | function.module = os.path.basename(module) |
| 1489 | function[SAMPLES] = 0 |
| 1490 | self.profile.add_function(function) |
| 1491 | |
| 1492 | return function |
| 1493 | |
| 1494 | |
| 1495 | class OprofileParser(LineParser): |
no test coverage detected