Commit 966f0d7d authored by David Lai's avatar David Lai

remove traces from poller, add more in lfcore

parent 62aa8ba5
......@@ -11,18 +11,29 @@
TRACEPOINT_EVENT(
fibre_tpp, // provider name
fibre_tracepoint, // tracepoint name
fibre_print, // tracepoint name
/* Input arguments */
TP_ARGS(
int, count,
char*, str_arg
char*, output_str
),
/* Output event fields */
TP_FIELDS(
ctf_integer(int, test_count, count)
ctf_string(my_string_field, str_arg)
ctf_string(my_string, output_str)
)
)
TRACEPOINT_EVENT(
fibre_tpp, // provider name
fibre_get_counter, // tracepoint name
TP_ARGS(
int, counter,
char*, output_str
),
TP_FIELDS(
ctf_integer(int, test_counter, counter)
ctf_string(my_string, output_str)
)
)
......
......@@ -14,9 +14,6 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#define TRACEPOINT_DEFINE
#include "libfibre/FibreTraceProvider.h"
#include "runtime/RuntimeImpl.h"
#include "libfibre/Poller.h"
......@@ -24,7 +21,6 @@ template<typename T>
inline void BasePoller::pollLoop(T& This, bool pollerFibre) {
EventScope& eventScope = This.eventScope;
tracepoint(fibre_tpp, fibre_tracepoint, 1, "pollLoop");
#if TESTING_POLLER_FIBRES
if (pollerFibre) eventScope.registerPollFD(This.pollFD);
else
......
......@@ -14,9 +14,9 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
// #define TRACEPOINT_DEFINE
#define TRACEPOINT_DEFINE
#include "libfibre/FibreTraceProvider.h"
#include "runtime/RuntimeImpl.h"
// #include "libfibre/FibreTraceProvider.h"
#include <execinfo.h> // see _lfAbort
#include <cxxabi.h> // see _lfAbort
......@@ -48,9 +48,11 @@ void _SYSCALLabortUnlock() { _abortLock.release(); }
std::atomic<int> _Bootstrapper::counter(0);
_Bootstrapper::_Bootstrapper() {
//tracepoint(fibre_tpp, fibre_tracepoint, 1, "testing");
tracepoint(fibre_tpp, fibre_print, "In _Bootstrapper()");
tracepoint(fibre_tpp, fibre_get_counter, counter, "current counter value");
if (++counter == 1) {
#if TESTING_ENABLE_STATISTICS
tracepoint(fibre_tpp, fibre_get_counter, counter, "counter should be 1");
StatsObject::lst = new std::list<StatsObject*>;
#endif
// create lock for debug output
......@@ -66,6 +68,8 @@ _Bootstrapper::_Bootstrapper() {
}
_Bootstrapper::~_Bootstrapper() {
tracepoint(fibre_tpp, fibre_print, "In ~_Bootstrapper()");
tracepoint(fibre_tpp, fibre_get_counter, counter, "current counter value");
if (--counter == 0) {
// delete _lfEventScope
delete _lfDebugOutputLock;
......@@ -74,9 +78,9 @@ _Bootstrapper::~_Bootstrapper() {
delete _globalStackLock;
#endif
#if TESTING_ENABLE_STATISTICS
tracepoint(fibre_tpp, fibre_print, "Deleting StatsObjects");
StatsObject::printAll(std::cout);
delete StatsObject::lst;
#endif
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment