Skip to content

Commit

Permalink
Fix abnormal symbol parsing when __irqentry_text_end is before __irqe…
Browse files Browse the repository at this point in the history
…ntry_text_start

On my ARM64 kernel 5.4 case

Symbol:
ffffffc0100820b8 T __irqentry_text_end
ffffffc0100820b8 T __irqentry_text_start

It will ignore all functions after __irqentry_text_start until __irqentry_text_end.
But this case __irqentry_text_end is before __irqentry_text_start.
So the problem happens.

Signed-off-by: Edward Wu <[email protected]>
  • Loading branch information
netedwardwu authored and yonghong-song committed Mar 5, 2021
1 parent 08d6340 commit a090b46
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/python/bcc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,12 @@ def get_kprobe_functions(event_re):
if fn == b'__irqentry_text_start':
in_irq_section = 1
continue
# __irqentry_text_end is not always after
# __irqentry_text_start. But only happens when
# no functions between two irqentry_text
elif fn == b'__irqentry_text_end':
in_irq_section = 2
continue
elif in_irq_section == 1:
if fn == b'__irqentry_text_end':
in_irq_section = 2
Expand Down

0 comments on commit a090b46

Please sign in to comment.