File tree Expand file tree Collapse file tree 2 files changed +20
-5
lines changed Expand file tree Collapse file tree 2 files changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -21,17 +21,17 @@ def last() -> HashMap:
21
21
@section ("tracepoint/syscalls/sys_enter_sync" )
22
22
def do_trace (ctx : c_void_p ) -> c_int64 :
23
23
key = 0
24
- tsp = last () .lookup (key )
24
+ tsp = last .lookup (key )
25
25
if tsp :
26
26
kt = ktime ()
27
27
delta = kt - tsp
28
28
if delta < 1000000000 :
29
29
time_ms = delta // 1000000
30
30
print (f"sync called within last second, last { time_ms } ms ago" )
31
- last () .delete (key )
31
+ last .delete (key )
32
32
else :
33
33
kt = ktime ()
34
- last () .update (key , kt )
34
+ last .update (key , kt )
35
35
return c_int64 (0 )
36
36
37
37
Original file line number Diff line number Diff line change @@ -192,8 +192,23 @@ def handle_assign(
192
192
elif isinstance (rval .func , ast .Attribute ):
193
193
logger .info (f"Assignment call attribute: { ast .dump (rval .func )} " )
194
194
if isinstance (rval .func .value , ast .Name ):
195
- # TODO: probably a struct access
196
- logger .info (f"TODO STRUCT ACCESS { ast .dump (rval )} " )
195
+ if rval .func .value .id in map_sym_tab :
196
+ map_name = rval .func .value .id
197
+ method_name = rval .func .attr
198
+ if HelperHandlerRegistry .has_handler (method_name ):
199
+ val = handle_helper_call (
200
+ rval ,
201
+ module ,
202
+ builder ,
203
+ func ,
204
+ local_sym_tab ,
205
+ map_sym_tab ,
206
+ structs_sym_tab ,
207
+ )
208
+ builder .store (val [0 ], local_sym_tab [var_name ].var )
209
+ else :
210
+ # TODO: probably a struct access
211
+ logger .info (f"TODO STRUCT ACCESS { ast .dump (rval )} " )
197
212
elif isinstance (rval .func .value , ast .Call ) and isinstance (
198
213
rval .func .value .func , ast .Name
199
214
):
You can’t perform that action at this time.
0 commit comments