diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/common/Makefile.am | 12 | ||||
-rw-r--r-- | src/common/probes.d | 2 | ||||
-rw-r--r-- | src/osmo-bts-trx/Makefile.am | 12 | ||||
-rw-r--r-- | src/osmo-bts-trx/probes.d | 7 | ||||
-rw-r--r-- | src/osmo-bts-trx/scheduler_trx.c | 3 | ||||
-rw-r--r-- | src/osmo-bts-trx/trx_if.c | 3 |
6 files changed, 39 insertions, 0 deletions
diff --git a/src/common/Makefile.am b/src/common/Makefile.am index e3a72dc8..3d106dbb 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -37,6 +37,18 @@ libbts_a_SOURCES = \ dtx_dl_amr_fsm.c \ scheduler_mframe.c \ ta_control.c \ + probes.d \ $(NULL) libl1sched_a_SOURCES = scheduler.c + +if ENABLE_SYSTEMTAP +probes.h: probes.d + $(DTRACE) -C -h -s $< -o $@ + +probes.lo: probes.d + $(LIBTOOL) --mode=compile $(AM_V_lt) --tag=CC env CFLAGS="$(CFLAGS)" $(DTRACE) -C -G -s $< -o $@ + +BUILT_SOURCES = probes.h probes.lo +libbts_la_LDADD = probes.lo +endif diff --git a/src/common/probes.d b/src/common/probes.d new file mode 100644 index 00000000..aaf9030e --- /dev/null +++ b/src/common/probes.d @@ -0,0 +1,2 @@ +provider osmo_bts { +}; diff --git a/src/osmo-bts-trx/Makefile.am b/src/osmo-bts-trx/Makefile.am index 54d1af9e..7317fdc9 100644 --- a/src/osmo-bts-trx/Makefile.am +++ b/src/osmo-bts-trx/Makefile.am @@ -51,6 +51,7 @@ osmo_bts_trx_SOURCES = \ trx_provision_fsm.c \ trx_vty.c \ loops.c \ + probes.d \ $(NULL) osmo_bts_trx_LDADD = \ @@ -58,3 +59,14 @@ osmo_bts_trx_LDADD = \ $(top_builddir)/src/common/libbts.a \ $(LDADD) \ $(NULL) + +if ENABLE_SYSTEMTAP +probes.h: probes.d + $(DTRACE) -C -h -s $< -o $@ + +probes.lo: probes.d + $(LIBTOOL) --mode=compile $(AM_V_lt) --tag=CC env CFLAGS="$(CFLAGS)" $(DTRACE) -C -G -s $< -o $@ + +BUILT_SOURCES = probes.h probes.lo +osmo_bts_trx_LDADD += probes.lo +endif diff --git a/src/osmo-bts-trx/probes.d b/src/osmo-bts-trx/probes.d new file mode 100644 index 00000000..2f905bd1 --- /dev/null +++ b/src/osmo-bts-trx/probes.d @@ -0,0 +1,7 @@ +provider osmo_bts_trx { + probe ul_data_start(int, int, int); /* trx_nr, ts_nr, fn */ + probe ul_data_done(int, int, int); /* trx_nr, ts_nr, fn */ + + probe dl_rts_start(int, int, int); /* trx_nr, ts_nr, fn */ + probe dl_rts_done(int, int, int); /* trx_nr, ts_nr, fn */ +}; diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index fcd1eeef..689a59d4 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -46,6 +46,7 @@ #include "l1_if.h" #include "trx_if.h" +#include "probes.h" /* an IDLE burst returns nothing. on C0 it is replaced by dummy burst */ int tx_idle_fn(struct l1sched_trx *l1t, enum trx_chan_type chan, @@ -84,7 +85,9 @@ static void trx_sched_fn(struct gsm_bts *bts, const uint32_t fn) /* process every TS of TRX */ for (tn = 0; tn < ARRAY_SIZE(l1t->ts); tn++) { /* ready-to-send */ + OSMO_BTS_TRX_DL_RTS_START(trx->nr, tn, sched_fn); _sched_rts(l1t, tn, GSM_TDMA_FN_SUM(sched_fn, plink->u.osmotrx.rts_advance)); + OSMO_BTS_TRX_DL_RTS_DONE(trx->nr, tn, sched_fn); /* All other parameters to be set by _sched_dl_burst() */ br = (struct trx_dl_burst_req) { diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c index ad6faad9..1ed89099 100644 --- a/src/osmo-bts-trx/trx_if.c +++ b/src/osmo-bts-trx/trx_if.c @@ -49,6 +49,7 @@ #include "l1_if.h" #include "trx_if.h" #include "trx_provision_fsm.h" +#include "probes.h" /* * socket helper functions @@ -1094,7 +1095,9 @@ skip_burst: hdr_ver, trx_data_desc_msg(&bi)); /* feed received burst into scheduler code */ + OSMO_BTS_TRX_UL_DATA_START(l1h->phy_inst->trx->nr, bi.tn, bi.fn); trx_sched_ul_burst(&l1h->l1s, &bi); + OSMO_BTS_TRX_UL_DATA_DONE(l1h->phy_inst->trx->nr, bi.tn, bi.fn); return 0; } |