changeset 735d73e394d3 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=735d73e394d3
description:
dev: Add option to disable framebuffer .bmp dump in run folder
There is an option to enable/disable all framebuffer dumps, but the
last frame always gets dumped in the run folder with no other way to
disable it. These files can add up very quickly running many
experiments.
This patch adds an option to disable them. The default behavior
remains unchanged.
diffstat:
src/dev/arm/RealView.py | 3 +++
src/dev/arm/hdlcd.cc | 17 ++++++++++-------
src/dev/arm/hdlcd.hh | 2 ++
src/dev/arm/pl111.cc | 18 ++++++++++--------
src/dev/arm/pl111.hh | 2 ++
5 files changed, 27 insertions(+), 15 deletions(-)
diffs (116 lines):
diff -r d3b7970e1b33 -r 735d73e394d3 src/dev/arm/RealView.py
--- a/src/dev/arm/RealView.py Thu Oct 17 10:20:45 2013 -0500
+++ b/src/dev/arm/RealView.py Thu Oct 17 10:20:45 2013 -0500
@@ -139,6 +139,8 @@
pixel_clock = Param.Clock('24MHz', "Pixel clock")
vnc = Param.VncInput(Parent.any, "Vnc server for remote frame buffer
display")
amba_id = 0x00141111
+ enable_capture = Param.Bool(True, "capture frame to
system.framebuffer.bmp")
+
class HDLcd(AmbaDmaDevice):
type = 'HDLcd'
@@ -149,6 +151,7 @@
vnc = Param.VncInput(Parent.any, "Vnc server for remote frame buffer "
"display")
amba_id = 0x00141000
+ enable_capture = Param.Bool(True, "capture frame to
system.framebuffer.bmp")
class RealView(Platform):
type = 'RealView'
diff -r d3b7970e1b33 -r 735d73e394d3 src/dev/arm/hdlcd.cc
--- a/src/dev/arm/hdlcd.cc Thu Oct 17 10:20:45 2013 -0500
+++ b/src/dev/arm/hdlcd.cc Thu Oct 17 10:20:45 2013 -0500
@@ -72,7 +72,8 @@
startFrameEvent(this), endFrameEvent(this), renderPixelEvent(this),
fillPixelBufferEvent(this), intEvent(this),
dmaDoneEventAll(MAX_OUTSTANDING_DMA_REQ_CAPACITY, this),
- dmaDoneEventFree(MAX_OUTSTANDING_DMA_REQ_CAPACITY)
+ dmaDoneEventFree(MAX_OUTSTANDING_DMA_REQ_CAPACITY),
+ enableCapture(p->enable_capture)
{
pioSize = 0xFFFF;
@@ -560,13 +561,15 @@
if (vnc)
vnc->setDirty();
- if (!pic)
- pic = simout.create(csprintf("%s.framebuffer.bmp", sys->name()), true);
+ if (enableCapture) {
+ if (!pic)
+ pic = simout.create(csprintf("%s.framebuffer.bmp", sys->name()),
true);
- assert(bmp);
- assert(pic);
- pic->seekp(0);
- bmp->write(pic);
+ assert(bmp);
+ assert(pic);
+ pic->seekp(0);
+ bmp->write(pic);
+ }
// start the next frame
frameUnderway = false;
diff -r d3b7970e1b33 -r 735d73e394d3 src/dev/arm/hdlcd.hh
--- a/src/dev/arm/hdlcd.hh Thu Oct 17 10:20:45 2013 -0500
+++ b/src/dev/arm/hdlcd.hh Thu Oct 17 10:20:45 2013 -0500
@@ -474,6 +474,8 @@
std::vector<DmaDoneEvent *> dmaDoneEventFree;
/**@}*/
+ bool enableCapture;
+
public:
typedef HDLcdParams Params;
diff -r d3b7970e1b33 -r 735d73e394d3 src/dev/arm/pl111.cc
--- a/src/dev/arm/pl111.cc Thu Oct 17 10:20:45 2013 -0500
+++ b/src/dev/arm/pl111.cc Thu Oct 17 10:20:45 2013 -0500
@@ -69,7 +69,7 @@
waterMark(0), dmaPendingNum(0), readEvent(this), fillFifoEvent(this),
dmaDoneEventAll(maxOutstandingDma, this),
dmaDoneEventFree(maxOutstandingDma),
- intEvent(this)
+ intEvent(this), enableCapture(p->enable_capture)
{
pioSize = 0xFFFF;
@@ -497,15 +497,17 @@
if (vnc)
vnc->setDirty();
- DPRINTF(PL111, "-- write out frame buffer into bmp\n");
+ if (enableCapture) {
+ DPRINTF(PL111, "-- write out frame buffer into bmp\n");
- if (!pic)
- pic = simout.create(csprintf("%s.framebuffer.bmp", sys->name()),
true);
+ if (!pic)
+ pic = simout.create(csprintf("%s.framebuffer.bmp",
sys->name()), true);
- assert(bmp);
- assert(pic);
- pic->seekp(0);
- bmp->write(pic);
+ assert(bmp);
+ assert(pic);
+ pic->seekp(0);
+ bmp->write(pic);
+ }
// schedule the next read based on when the last frame started
// and the desired fps (i.e. maxFrameTime), we turn the
diff -r d3b7970e1b33 -r 735d73e394d3 src/dev/arm/pl111.hh
--- a/src/dev/arm/pl111.hh Thu Oct 17 10:20:45 2013 -0500
+++ b/src/dev/arm/pl111.hh Thu Oct 17 10:20:45 2013 -0500
@@ -348,6 +348,8 @@
/** Wrapper to create an event out of the interrupt */
EventWrapper<Pl111, &Pl111::generateInterrupt> intEvent;
+ bool enableCapture;
+
public:
typedef Pl111Params Params;
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev