예제 #1
0
파일: physmem.py 프로젝트: coodie/mimiker
 def dump_segments(self):
     segments = self.get_all_segments()
     rows = [['Segment', 'Start', 'End', 'Pages no']]
     for idx, seg in enumerate(segments):
         rows.append([str(idx), as_hex(seg['start']), as_hex(seg['end']),
                      str(seg['npages'])])
     ptable(rows, header=True)
예제 #2
0
 def dump_entrylo(self, vpn, lo):
     if not is_valid(lo):
         return "-"
     vpn = as_hex(vpn)
     ppn = as_hex(ppn_of(lo))
     dirty = '-D'[is_dirty(lo)]
     globl = '-G'[is_global(lo)]
     return "%s => %s %c%c" % (vpn, ppn, dirty, globl)
예제 #3
0
 def dump_segment_freeq(self, idx, freeq, size):
     pages = tailq.collect_values(freeq, 'freeq')
     return [[
         str(idx),
         str(size),
         as_hex(page['paddr']),
         as_hex(page['vaddr'])
     ] for page in pages]
예제 #4
0
 def dump_segment_freeq(self, idx, freeq, size):
     pages = TailQueue(freeq, 'freeq')
     return [[
         str(idx),
         str(size),
         as_hex(page['paddr']),
         as_hex(page['vaddr'])
     ] for page in pages]
예제 #5
0
 def dump_segments(self):
     segments = self.get_all_segments()
     rows = [['Segment', 'Start', 'End', 'Pages no']]
     for idx, seg in enumerate(segments):
         rows.append([
             str(idx),
             as_hex(seg['start']),
             as_hex(seg['end']),
             str(seg['npages'])
         ])
     ptable(rows, header=True)
예제 #6
0
파일: klog.py 프로젝트: barnasm/mimiker
 def dump_info(self, klog):
     rows = [['Mask', as_hex(klog.mask)],
             ['Verbose', str(klog.verbose)],
             ['Messages', str(len(klog))]]
     ptable(rows, header=False, fmt='rl')
예제 #7
0
파일: physmem.py 프로젝트: coodie/mimiker
 def dump_segment_freeq(self, idx, freeq, size):
     pages = TailQueue(freeq, 'freeq')
     return [[str(idx), str(size), as_hex(page['paddr']),
              as_hex(page['vaddr'])] for page in pages]
예제 #8
0
파일: klog.py 프로젝트: coodie/mimiker
 def dump_info(self, klog):
     rows = [['Mask', as_hex(klog.mask)],
             ['Verbose', str(klog.verbose)],
             ['Messages', str(len(klog))]]
     ptable(rows, header=False, fmt='rl')
예제 #9
0
 def dump_general_info(self, number_of_logs, klog):
     rows_general = [["Mask", "Verbose", "Log number"]]
     mask = as_hex(klog['mask'])
     verbose = bool(klog['verbose'])
     rows_general.append([mask, str(verbose), str(number_of_logs)])
     ptable(rows_general, header=True, fmt='l')