in heats.py [0:0]
def pr_heats(args, damon_result):
tid = args.tid
tres = args.resol[0]
tmin = args.time_range[0]
tmax = args.time_range[1]
ares = args.resol[1]
amin = args.address_range[0]
amax = args.address_range[1]
tunit = (tmax - tmin) // tres
aunit = (amax - amin) // ares
# Compensate the values so that those fit with the resolution
tmax = tmin + tunit * tres
amax = amin + aunit * ares
# __pr_heats(damon_result, tid, tunit, tmin, tmax, aunit, amin, amax)
snapshots = damon_result.target_snapshots[tid]
pixels = heat_pixels_from_snapshots(snapshots, [tmin, tmax], [amin, amax],
[tres, ares])
if args.heatmap == 'stdout':
heatmap_plot_ascii(pixels, [tmin, tmax], [amin, amax], [tres, ares],
args.stdout_heatmap_color)
return
for row in pixels:
for pixel in row:
time = pixel.time
addr = pixel.addr
if not args.abs_time:
time -= tmin
if not args.abs_addr:
addr -= amin
print('%s\t%s\t%s' % (time, addr, pixel.heat))