On Tue, Jan 02, 2007 at 03:05:56PM -0800, Nishanth Aravamudan wrote:
> I noticed that we currently put the "done"s from the segment remapping
> debugging on their own line. But I'm not sure I see the value, sine it
> seems rather out of place, given that we specifically use DEBUG_CONT().
> I think it looks cleaner (and saves up to two lines of screen space) to
> not newline-terminate the previous output.
Ah.. we need to be very careful about this. It may be this way
because if we're in line buffered mode and it dies in the remap you
won't see any of the message which is confusing. That can be worked
around with an explicit flush(), of course, but I'm not sure if we
have here.
> diff --git a/elflink.c b/elflink.c
> index b621a3a..60af377 100644
> --- a/elflink.c
> +++ b/elflink.c
> @@ -600,13 +600,13 @@ static int prepare_segment(struct seg_info *seg)
> * be contained in the filesz portion of the segment.
> */
>
> - DEBUG("Mapped hugeseg at %p. Copying %#0lx bytes from %p...\n",
> + DEBUG("Mapped hugeseg at %p. Copying %#0lx bytes from %p...",
> p, seg->filesz, seg->vaddr);
> memcpy(p, seg->vaddr, seg->filesz);
> DEBUG_CONT("done\n");
>
> if (extra_end > extra_start) {
> - DEBUG("Copying extra %#0lx bytes from %p...\n",
> + DEBUG("Copying extra %#0lx bytes from %p...",
> (unsigned long)(extra_end - extra_start), extra_start);
> gap = extra_start - (seg->vaddr + seg->filesz);
> memcpy((p + seg->filesz + gap), extra_start, (extra_end -
> extra_start));
>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Libhugetlbfs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel