diff options
author | Wang Qiang <wangqiang.hunan@gmail.com> | 2014-05-26 17:59:57 +0800 |
---|---|---|
committer | Christophe Fergeau <cfergeau@redhat.com> | 2014-05-26 18:51:36 +0200 |
commit | e7db94d833e848b63fdd9956ba51ce2c5917cb25 (patch) | |
tree | 0aaa42ea565ca2641be1cb5570a98d9302f055bd | |
parent | 1aac71d51ca6034327a91616310bb03b44c081ef (diff) | |
download | spice-e7db94d833e848b63fdd9956ba51ce2c5917cb25.tar.gz spice-e7db94d833e848b63fdd9956ba51ce2c5917cb25.tar.xz spice-e7db94d833e848b63fdd9956ba51ce2c5917cb25.zip |
Fix make failed when uncommented COMPRESS_STAT in red_worker.c
https://bugs.freedesktop.org/show_bug.cgi?id=79246
As a developer, I maybe want to see the detail compress stat of spice, like this:
Method count orig_size(MB) enc_size(MB) enc_time(s)
QUIC 846 948.02 147.22 7.51
GLZ 2895 594.90 26.60 1.33
ZLIB GLZ 0 0.00 0.00 0.00
LZ 1 3.15 0.01 0.00
JPEG 0 0.00 0.00 0.00
JPEG-RGBA 0 0.00 0.00 0.00
----------------------------------------------------------------------------
Total 3742 1546.07 173.83 8.84
But when I uncommented the COMPRESS_STAT and COMPRESS_DEBUG in red_worker.c and make.
I got some error(in Bugzilla). This error because of some simple syntax errors.
Commit this patch to fix this issue.
Signed-off-by: Wang Qiang <wangqiang.hunan@gmail.com>
-rw-r--r-- | server/red_worker.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/red_worker.c b/server/red_worker.c index 1871e139..6bdad93e 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -257,7 +257,7 @@ static inline void stat_compress_add(stat_info_t *info, stat_time_t start, int o info->comp_size += comp_size; } -double inline stat_byte_to_mega(uint64_t size) +static inline double stat_byte_to_mega(uint64_t size) { return (double)size / (1000 * 1000); } @@ -1152,7 +1152,7 @@ static void print_compress_stats(DisplayChannel *display_channel) display_channel->zlib_glz_stat.comp_size : display_channel->glz_stat.comp_size; - spice_info("==> Compression stats for display %u", display_channel->common.id); + spice_info("==> Compression stats for display %u", display_channel->common.base.id); spice_info("Method \t count \torig_size(MB)\tenc_size(MB)\tenc_time(s)"); spice_info("QUIC \t%8d\t%13.2f\t%12.2f\t%12.2f", display_channel->quic_stat.count, |