[PATCH spice-server 12/15] stat: Remove unused stat_remove_*

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It was introduced in c1b79eb035fa158fb2ac3bc8e559809611070016
but never used.

Signed-off-by: Pavel Grunt <pgrunt@xxxxxxxxxx>
---
 server/reds.c | 19 -------------------
 server/stat.h |  4 ----
 2 files changed, 23 deletions(-)

diff --git a/server/reds.c b/server/reds.c
index 9bd28df..d99cf97 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -275,20 +275,6 @@ StatNodeRef stat_add_node(StatNodeRef parent, const char *name, int visible)
     return ref;
 }
 
-static void stat_remove(SpiceStatNode *node)
-{
-    pthread_mutex_lock(&reds->stat_lock);
-    node->flags &= ~SPICE_STAT_NODE_FLAG_ENABLED;
-    reds->stat->generation++;
-    reds->stat->num_of_nodes--;
-    pthread_mutex_unlock(&reds->stat_lock);
-}
-
-void stat_remove_node(StatNodeRef ref)
-{
-    stat_remove(&reds->stat->nodes[ref]);
-}
-
 uint64_t *stat_add_counter(StatNodeRef parent, const char *name, int visible)
 {
     StatNodeRef ref = stat_add_node(parent, name, visible);
@@ -302,11 +288,6 @@ uint64_t *stat_add_counter(StatNodeRef parent, const char *name, int visible)
     return &node->value;
 }
 
-void stat_remove_counter(uint64_t *counter)
-{
-    stat_remove((SpiceStatNode *)(counter - offsetof(SpiceStatNode, value)));
-}
-
 void reds_update_stat_value(uint32_t value)
 {
     RedsStatValue *stat_value = &reds->roundtrip_stat;
diff --git a/server/stat.h b/server/stat.h
index 3c980d0..63bf4cc 100644
--- a/server/stat.h
+++ b/server/stat.h
@@ -25,9 +25,7 @@ typedef uint32_t StatNodeRef;
 
 #ifdef RED_STATISTICS
 StatNodeRef stat_add_node(StatNodeRef parent, const char *name, int visible);
-void stat_remove_node(StatNodeRef node);
 uint64_t *stat_add_counter(StatNodeRef parent, const char *name, int visible);
-void stat_remove_counter(uint64_t *counter);
 
 #define stat_inc_counter(counter, value) {  \
     if (counter) {                          \
@@ -37,9 +35,7 @@ void stat_remove_counter(uint64_t *counter);
 
 #else
 #define stat_add_node(p, n, v) INVALID_STAT_REF
-#define stat_remove_node(n)
 #define stat_add_counter(p, n, v) NULL
-#define stat_remove_counter(c)
 #define stat_inc_counter(c, v)
 #endif /* RED_STATISTICS */
 
-- 
2.5.0

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]