[Devel] Re: [PATCH 1/1] cr: add a few more ckpt_write_err()s

Oren Laadan orenl at librato.com
Fri Sep 11 14:15:45 PDT 2009


I wonder if it can be useful to decide on a common "format", that
can be useful in the future for automatic error analysis. E.g:

"[PID %d ERR %d]: .....", for error with a specific task, and
"[PID %d ERR %d OBJ %d]: ......" for error with an object, and so on.

Or even a bit more fancy, like:

	ckpt_write_err("EO", "error message %p blah", err, obj, ptr);
			SPEC   FMT		      VARS...

Which ckpt_write_err() will translate to

	sprintf(s, "[PID %d ERR %d] FMT", VARS...);

So the SPEC "EO" (stands for ERR, OBJ) becomes "[PID %d ERR %d OBJ %d]: "
(pid is mandatory, the rest requested by the caller):
	E -> ERR %d
	O -> OBJ %d
	P -> PTR %p
	S -> SYM %pS
	etc...

?

Oren.


Serge E. Hallyn wrote:
> The main point is for new-comers to the checkpoint/restart tree to
> be able to help us debug their otherwise mysterious checkpoint failures.
> 
> Signed-off-by: Serge E. Hallyn <serue at us.ibm.com>
> ---
>  checkpoint/checkpoint.c |   28 +++++++++++++++++++++++-----
>  checkpoint/files.c      |   37 ++++++++++++++++++++++++++++++-------
>  checkpoint/memory.c     |   17 ++++++++++++++---
>  3 files changed, 67 insertions(+), 15 deletions(-)
> 

[...]


_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list