diff options
author | Chris Manton <cmanton@google.com> | 2014-08-13 16:38:57 -0700 |
---|---|---|
committer | Andre Eisenbach <eisenbach@google.com> | 2015-03-16 16:51:38 -0700 |
commit | 78a51cb6c9efdc643aa812964adf5de6367eb477 (patch) | |
tree | 100737a63b80336398be44d0e6ae8fdd05f6926e /main | |
parent | f95157c12f7fe1cea51bfe60b9d00d1546236b56 (diff) | |
download | android_system_bt-78a51cb6c9efdc643aa812964adf5de6367eb477.tar.gz android_system_bt-78a51cb6c9efdc643aa812964adf5de6367eb477.tar.bz2 android_system_bt-78a51cb6c9efdc643aa812964adf5de6367eb477.zip |
counter implementation
Diffstat (limited to 'main')
-rwxr-xr-x | main/bte_main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/main/bte_main.c b/main/bte_main.c index 955a54e3b..e0cc3d50b 100755 --- a/main/bte_main.c +++ b/main/bte_main.c @@ -41,6 +41,7 @@ #include "btu.h" #include "btsnoop.h" #include "bt_utils.h" +#include "counter.h" #include "fixed_queue.h" #include "future.h" #include "gki.h" @@ -92,6 +93,7 @@ fixed_queue_t *btu_hci_msg_queue; void bte_main_boot_entry(void) { module_init(get_module(GKI_MODULE)); + module_init(get_module(COUNTER_MODULE)); hci = hci_layer_get_interface(); if (!hci) @@ -129,6 +131,7 @@ void bte_main_shutdown() module_clean_up(get_module(STACK_CONFIG_MODULE)); + module_clean_up(get_module(COUNTER_MODULE)); module_clean_up(get_module(GKI_MODULE)); } @@ -305,6 +308,8 @@ void bte_main_hci_send (BT_HDR *p_msg, UINT16 event) p_msg->event = event; + counter_add("main.tx.packets", 1); + counter_add("main.tx.bytes", p_msg->len); if((sub_event == LOCAL_BR_EDR_CONTROLLER_ID) || \ (sub_event == LOCAL_BLE_CONTROLLER_ID)) |