Remove DisplayChannel::red_drawable_count

It's only used in a few debug printfs. If we want these stats, we'll
have to find a better way than forcing a dependency on a high-level
class in a lower-level _unref method just to maintain the stats.

Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
Christophe Fergeau 2016-02-12 18:51:01 +01:00 committed by Frediano Ziglio
parent 78b495e467
commit f8617db67a
3 changed files with 6 additions and 11 deletions

View File

@ -1297,8 +1297,8 @@ void display_channel_free_some(DisplayChannel *display)
DisplayChannelClient *dcc;
RingItem *item, *next;
spice_debug("#draw=%d, #red_draw=%d, #glz_draw=%d", display->drawable_count,
display->red_drawable_count, display->glz_drawable_count);
spice_debug("#draw=%d, #glz_draw=%d", display->drawable_count,
display->glz_drawable_count);
FOREACH_DCC(display, item, next, dcc) {
GlzSharedDictionary *glz_dict = dcc ? dcc->glz_dict : NULL;
@ -1943,8 +1943,8 @@ static void on_disconnect(RedChannelClient *rcc)
display_channel_compress_stats_print(display);
// this was the last channel client
spice_debug("#draw=%d, #red_draw=%d, #glz_draw=%d",
display->drawable_count, display->red_drawable_count,
spice_debug("#draw=%d, #glz_draw=%d",
display->drawable_count,
display->glz_drawable_count);
}

View File

@ -181,7 +181,6 @@ struct DisplayChannel {
_Drawable drawables[NUM_DRAWABLES];
_Drawable *free_drawables;
uint32_t red_drawable_count;
uint32_t glz_drawable_count;
int stream_video;

View File

@ -137,7 +137,6 @@ void red_drawable_unref(DisplayChannel *display, RedDrawable *red_drawable,
if (--red_drawable->refs) {
return;
}
display->red_drawable_count--;
release_info_ext.group_id = group_id;
release_info_ext.info = red_drawable->release_info;
display->common.qxl->st->qif->release_resource(display->common.qxl, release_info_ext);
@ -196,7 +195,6 @@ static RedDrawable *red_drawable_new(RedWorker *worker)
RedDrawable * red = spice_new0(RedDrawable, 1);
red->refs = 1;
worker->display_channel->red_drawable_count++;
return red;
}
@ -856,9 +854,8 @@ static void handle_dev_oom(void *opaque, void *payload)
spice_return_if_fail(worker->running);
// streams? but without streams also leak
spice_debug("OOM1 #draw=%u, #red_draw=%u, #glz_draw=%u current %u pipes %u",
spice_debug("OOM1 #draw=%u, #glz_draw=%u current %u pipes %u",
display->drawable_count,
display->red_drawable_count,
display->glz_drawable_count,
display->current_size,
red_channel_sum_pipes_size(display_red_channel));
@ -869,9 +866,8 @@ static void handle_dev_oom(void *opaque, void *payload)
display_channel_free_some(worker->display_channel);
worker->qxl->st->qif->flush_resources(worker->qxl);
}
spice_debug("OOM2 #draw=%u, #red_draw=%u, #glz_draw=%u current %u pipes %u",
spice_debug("OOM2 #draw=%u, #glz_draw=%u current %u pipes %u",
display->drawable_count,
display->red_drawable_count,
display->glz_drawable_count,
display->current_size,
red_channel_sum_pipes_size(display_red_channel));