Ben Thomas
2006-Mar-10 22:06 UTC
[Xen-devel] [PATCH] - xc_core.c/xenctrl.h - refactor slightly to allow user specified output routines
The existing xc_domain_dumpcore is very specific to disk/file based output. Refactor the code slightly to allow more user-specified control. This is done by adding a parallel xc_domain_dumpcore2 (naming isn''t always my strong suit), which allows the specification of a callback routine and an opaque argument block. The existing dumpcore routine is modified to use the callback for all write operations and to turn the single seek into a small write (it''s for page alignment). I''ve also included a small test routine, testdump.c, which drives both APIs and allows writing core to either a local disk file or across a network. And, I''ve included a sample network "catcher" program that receives a cross-network dump from testdump. And, good news, this probably ends my current hacking/interest in xc_domain_dumpcore. Signed-off-by: Ben Thomas (bthomas@virtualiron.com) -- ------------------------------------------------------------------------ Ben Thomas Virtual Iron Software bthomas@virtualiron.com Tower 1, Floor 2 978-849-1214 900 Chelmsford Street Lowell, MA 01851 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
NAHieu
2006-Mar-14 08:36 UTC
Re: [Xen-devel] [PATCH] - xc_core.c/xenctrl.h - refactor slightly to allow user specified output routines
It seems that there is a memory leak in xc_domain_dumpcore2 (renamed to xc_domain_dumpcore_via_callback() by Keir): you failed to free(page_array) it in the function? Thanks. H On 3/11/06, Ben Thomas <bthomas@virtualiron.com> wrote:> The existing xc_domain_dumpcore is very specific to disk/file based > output. Refactor the code slightly to allow more user-specified > control. This is done by adding a parallel xc_domain_dumpcore2 (naming > isn''t always my strong suit), which allows the specification of a > callback routine and an opaque argument block. The existing dumpcore > routine is modified to use the callback for all write operations and > to turn the single seek into a small write (it''s for page alignment). > > I''ve also included a small test routine, testdump.c, which drives > both APIs and allows writing core to either a local disk file or > across a network. And, I''ve included a sample network "catcher" > program that receives a cross-network dump from testdump. > > And, good news, this probably ends my current hacking/interest > in xc_domain_dumpcore. > > > Signed-off-by: Ben Thomas (bthomas@virtualiron.com) > > -- > ------------------------------------------------------------------------ > Ben Thomas Virtual Iron Software > bthomas@virtualiron.com Tower 1, Floor 2 > 978-849-1214 900 Chelmsford Street > Lowell, MA 01851 > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel > > > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
NAHieu
2006-Mar-14 08:59 UTC
Re: [Xen-devel] [PATCH] - xc_core.c/xenctrl.h - refactor slightly to allow user specified output routines
This patch fixes the memory leak in xc_domain_dumpcore_via_callback. It also get rid one parameter of copy_from_domain_page() function. Thanks. H On 3/14/06, NAHieu <nahieu@gmail.com> wrote:> It seems that there is a memory leak in xc_domain_dumpcore2 (renamed > to xc_domain_dumpcore_via_callback() by Keir): you failed to > free(page_array) it in the function? > > > Thanks. > H > > On 3/11/06, Ben Thomas <bthomas@virtualiron.com> wrote: > > The existing xc_domain_dumpcore is very specific to disk/file based > > output. Refactor the code slightly to allow more user-specified > > control. This is done by adding a parallel xc_domain_dumpcore2 (naming > > isn''t always my strong suit), which allows the specification of a > > callback routine and an opaque argument block. The existing dumpcore > > routine is modified to use the callback for all write operations and > > to turn the single seek into a small write (it''s for page alignment). > > > > I''ve also included a small test routine, testdump.c, which drives > > both APIs and allows writing core to either a local disk file or > > across a network. And, I''ve included a sample network "catcher" > > program that receives a cross-network dump from testdump. > > > > And, good news, this probably ends my current hacking/interest > > in xc_domain_dumpcore. > > > > > > Signed-off-by: Ben Thomas (bthomas@virtualiron.com) > > > > -- > > ------------------------------------------------------------------------ > > Ben Thomas Virtual Iron Software > > bthomas@virtualiron.com Tower 1, Floor 2 > > 978-849-1214 900 Chelmsford Street > > Lowell, MA 01851 > > > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xensource.com > > http://lists.xensource.com/xen-devel > > > > > > > > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Maybe Matching Threads
- Re: dumpcore changes -- [Xen-changelog] [xen-unstable] In this patch, the xc_domain_dumpcore_via_callback() in xc_core.c of
- RE: [PATCH] - make qemu serial summagraphics settings a bitmore fluid
- Fwd: NetBSD xl core-dump not working... Memory fault (core dumped)
- [PATCH] Support cross-bitness guest when core-dumping
- [PATCH - proposed] XI Shadow Page Table Mechanism]