[Spice-devel] [PATCH] record: save real time during recording

Pavel Grunt pgrunt at redhat.com
Fri Feb 5 07:31:39 UTC 2016


On Thu, 2016-02-04 at 16:10 +0000, Frediano Ziglio wrote:
> Instead of using CPU time use a timer depending on real times.
> Currently that time in the record log is not used.
> However if we want to reproduce problems with stream would be useful
> to have real times instead.
Yes, it makes sense

Thanks,
Pavel

Acked-by: Pavel Grunt <pgrunt at redhat.com>

> 
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
>  server/red-worker.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/server/red-worker.c b/server/red-worker.c
> index df24a5b..e70c9df 100644
> --- a/server/red-worker.c
> +++ b/server/red-worker.c
> @@ -242,7 +242,7 @@ static int red_process_display(RedWorker *worker,
> int *ring_is_empty)
>  
>          if (worker->record_fd)
>              red_record_qxl_command(worker->record_fd, &worker-
> >mem_slots, ext_cmd,
> -                                   stat_now(CLOCK_THREAD_CPUTIME_ID)
> );
> +                                   stat_now(CLOCK_MONOTONIC));
>  
>          stat_inc_counter(worker->command_counter, 1);
>          worker->display_poll_tries = 0;
> @@ -1221,7 +1221,7 @@ static void worker_dispatcher_record(void
> *opaque, uint32_t message_type, void *
>  {
>      RedWorker *worker = opaque;
>  
> -    red_record_event(worker->record_fd, 1, message_type,
> stat_now(CLOCK_THREAD_CPUTIME_ID));
> +    red_record_event(worker->record_fd, 1, message_type,
> stat_now(CLOCK_MONOTONIC));
>  }
>  
>  static void register_callbacks(Dispatcher *dispatcher)


More information about the Spice-devel mailing list