[CRIU] [PATCH CRIU 3/7] log_dirty: add dirty-log.img to save dirty memory pages stats

Cyrill Gorcunov gorcunov at gmail.com
Tue Apr 12 00:27:44 PDT 2016


On Thu, Apr 07, 2016 at 04:28:42PM +0300, Pavel Tikhomirov wrote:
> Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
> ---
>  criu/dirty-logger.c | 31 +++++++++++++++++++++++++++++++
>  1 file changed, 31 insertions(+)
> 
> diff --git a/criu/dirty-logger.c b/criu/dirty-logger.c
> index 6620626..5e8baa5 100644
> --- a/criu/dirty-logger.c
> +++ b/criu/dirty-logger.c
> @@ -1,6 +1,37 @@
> +#include <stdio.h>
> +#include <unistd.h>
>  #include <pthread.h>
>  
> +#include "imgset.h"
> +
> +#define CR_DIRTY_LOG "dirty-log.img"
> +
>  void *dirty_logger_pthread(void *arg)
>  {
> +	int fd;
> +	FILE *fp;
> +	int *pret = (int *)arg;

I think this is somehow out of trend, the dirty log statistics should
be done just like we do for general statistics, ie in protobuf
format (see criu/stats.c). Or maybe even merged with it.
xemul@, opinion?


More information about the CRIU mailing list