Refactor MemStateProvider to use new SyscallEvent and io rq objects
authorAntoine Busque <antoinebusque@gmail.com>
Tue, 31 Mar 2015 20:48:40 +0000 (16:48 -0400)
committerAntoine Busque <antoinebusque@gmail.com>
Tue, 31 Mar 2015 20:48:40 +0000 (16:48 -0400)
linuxautomaton/linuxautomaton/mem.py

index 46e07ad372446973e8aac76e5994a2c2ef954171..eb21c0eb9b31daef811780e8e4350d7810faac9c 100644 (file)
@@ -54,15 +54,13 @@ class MemStateProvider(sp.StateProvider):
         self._state.mm.page_count += 1
 
         # Increment the number of pages allocated during the execution
-        # of all currently pending syscalls
+        # of all currently syscall io requests
         for process in self._state.tids.values():
-            if not process.current_syscall:
+            if process.current_syscall is None:
                 continue
 
-            if 'pages_allocated' not in process.current_syscall:
-                process.current_syscall['pages_allocated'] = 1
-            else:
-                process.current_syscall['pages_allocated'] += 1
+            if process.current_syscall.io_rq:
+                process.current_syscall.io_rq.pages_allocated += 1
 
         current_process = self._get_current_proc(event)
         if current_process is None:
This page took 0.023889 seconds and 5 git commands to generate.