File tree 4 files changed +4
-4
lines changed
4 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 6
6
from time import sleep
7
7
8
8
b = BPF (src_file = "task_switch.c" )
9
- b .attach_kprobe (event_re = r'^finish_task_switch$|^finish_task_switch.isra. d$' ,
9
+ b .attach_kprobe (event_re = r'^finish_task_switch$|^finish_task_switch\ .isra\.\ d$' ,
10
10
fn_name = "count_sched" )
11
11
12
12
# generate many schedule events
Original file line number Diff line number Diff line change @@ -755,7 +755,7 @@ def get_kprobe_functions(event_re):
755
755
elif fn .startswith (b'__SCT__' ):
756
756
continue
757
757
# Exclude all gcc 8's extra .cold functions
758
- elif re .match (b '^.*.cold(. d+)?$' , fn ):
758
+ elif re .match (br '^.*\ .cold(\.\ d+)?$' , fn ):
759
759
continue
760
760
if (t .lower () in [b't' , b'w' ]) and re .fullmatch (event_re , fn ) \
761
761
and fn not in blacklist \
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ class TestTracingEvent(TestCase):
31
31
def setUp (self ):
32
32
b = BPF (text = text , debug = 0 )
33
33
self .stats = b .get_table (b'stats' )
34
- b .attach_kprobe (event_re = b'^finish_task_switch$|^finish_task_switch.isra. d$' ,
34
+ b .attach_kprobe (event_re = b'^finish_task_switch$|^finish_task_switch\ .isra\.\ d$' ,
35
35
fn_name = b'count_sched' )
36
36
37
37
def test_sched1 (self ):
Original file line number Diff line number Diff line change @@ -204,7 +204,7 @@ def initialize(arg_list = sys.argv[1:]):
204
204
Global .args .timestamp = True
205
205
if not Global .args .ebpf and os .geteuid () != 0 :
206
206
return (os .EX_NOPERM , "Need sudo (CAP_SYS_ADMIN) for BPF() system call" )
207
- if re .match (r'^3.10..*el7.*$' , platform .release ()): # Centos/Red Hat
207
+ if re .match (r'^3\ .10\ ..*el7.*$' , platform .release ()): # Centos/Red Hat
208
208
Global .args .timespec = True
209
209
for _ in range (2 ):
210
210
c = _embedded_c (Global .args )
You can’t perform that action at this time.
0 commit comments