aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-06-30 14:48:13 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-07-01 13:22:30 +0200
commit6b3a27be054a2cc4667a22a4c435cd5d7ecb59ce (patch)
treeb2fcf43f27b780887532c5d52deda1f118e20db7
parent596f547a378786b2a9dea5a3b1e6182abf794e60 (diff)
alloc: Disable inner loop debugging by default (TODO)
Callgrind: 42%-> 25%
-rw-r--r--src/gprs_rlcmac_ts_alloc.cpp24
1 files changed, 15 insertions, 9 deletions
diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp
index 5edf9ffa..8c42bb19 100644
--- a/src/gprs_rlcmac_ts_alloc.cpp
+++ b/src/gprs_rlcmac_ts_alloc.cpp
@@ -501,12 +501,14 @@ static int find_multi_slots(struct gprs_rlcmac_bts *bts,
#endif
if (!rx_good) {
+#ifdef ENABLE_TS_ALLOC_DEBUG
LOGP(DRLCMAC, LOGL_DEBUG,
"- Skipping DL/UL slots: (TS=0)\"%s\"(TS=7), "
"no DL slots available\n",
set_flag_chars(set_flag_chars(slot_info,
rx_bad, 'x', '.'),
tx_window, 'U'));
+#endif
continue;
}
@@ -520,16 +522,18 @@ static int find_multi_slots(struct gprs_rlcmac_bts *bts,
req_common_slots = OSMO_MIN(req_common_slots, 2);
if (req_common_slots != common_slot_count) {
- LOGP(DRLCMAC, LOGL_DEBUG,
- "- Skipping DL/UL slots: (TS=0)\"%s\"(TS=7), "
- "invalid number of common TS: %d (expected %d)\n",
- set_flag_chars(set_flag_chars(set_flag_chars(
- slot_info,
- rx_bad, 'x', '.'),
- rx_window, 'D'),
+#ifdef ENABLE_TS_ALLOC_DEBUG
+ LOGP(DRLCMAC, LOGL_DEBUG,
+ "- Skipping DL/UL slots: (TS=0)\"%s\"(TS=7), "
+ "invalid number of common TS: %d (expected %d)\n",
+ set_flag_chars(set_flag_chars(set_flag_chars(
+ slot_info,
+ rx_bad, 'x', '.'),
+ rx_window, 'D'),
tx_window, 'U'),
- common_slot_count,
- req_common_slots);
+ common_slot_count,
+ req_common_slots);
+#endif
continue;
}
@@ -554,6 +558,7 @@ static int find_multi_slots(struct gprs_rlcmac_bts *bts,
}
}
+#ifdef ENABLE_TS_ALLOC_DEBUG
LOGP(DRLCMAC, LOGL_DEBUG,
"- Considering DL/UL slots: (TS=0)\"%s\"(TS=7), "
"capacity = %d\n",
@@ -564,6 +569,7 @@ static int find_multi_slots(struct gprs_rlcmac_bts *bts,
tx_window, 'U'),
rx_window & tx_window, 'C'),
capacity);
+#endif
if (capacity <= max_capacity)
continue;