Add unregister measures
authorDavid Goulet <david.goulet@polymtl.ca>
Tue, 4 Oct 2011 18:17:01 +0000 (14:17 -0400)
committerDavid Goulet <david.goulet@polymtl.ca>
Tue, 4 Oct 2011 18:17:01 +0000 (14:17 -0400)
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
benchmark/benchmark.c
benchmark/benchmark.h
benchmark/measures.h
ltt-sessiond/ust-app.c

index 8fbe8ad78416bcfdd2843ef6b986fa486e9ab096..9100fae5735c64bdc3cc41001908afdfa3597a4a 100644 (file)
@@ -150,6 +150,29 @@ no_data:
        return;
 }
 
+/*
+ * Time taken by an UST apps to unregister.
+ */
+void bench_print_ust_unregister(void)
+{
+    double res;
+
+    fprintf(fp, "--- UST unregister time ---\n");
+
+    if (time_ust_unregister_start == 0 || time_ust_unregister_stop == 0) {
+        goto no_data;
+    }
+
+    res = get_bench_time(time_ust_unregister_start, time_ust_unregister_stop);
+    fprintf(fp, "UST unregister time\n");
+    fprintf(fp, "Time: %.20f sec.\n", res);
+    return;
+
+no_data:
+    fprintf(fp, "NO DATA\n");
+    return;
+}
+
 /*
  * This time value is only coherent is an UST application registered.
  */
index 2a23fd97ec98e2a45e9188d8a7da0e10137fb17a..bbdadbbd8080530a49856522691befa133375d21 100644 (file)
@@ -33,6 +33,7 @@ void bench_init(void);
 void bench_close(void);
 void bench_print_boot_process(void);
 void bench_print_ust_register(void);
+void bench_print_ust_unregister(void);
 void bench_print_ust_notification(void);
 double bench_get_create_session(void);
 double bench_get_destroy_session(void);
index 91809e1ac40cd976f98520e1181c73facac363d9..cbcac2204d0985186e333e0b9ffa7fa9b8792f60 100644 (file)
@@ -69,6 +69,12 @@ cycles_t time_ust_register_start;
  */
 cycles_t time_ust_register_stop;
 
+/*
+ *  * UST unregister time
+ *   */
+cycles_t time_ust_unregister_start;
+cycles_t time_ust_unregister_stop;
+
 /*
  * UST dispatch registration request time
  *
index ea062557e56cf60ee471f62921bcdd1082a2e1ee..afd8ea5c0492d82ff6a4d833f0c0480e2b686764 100644 (file)
@@ -28,6 +28,8 @@
 
 #include "ust-app.h"
 
+#include "benchmark.h"
+
 /* Init ust traceable application's list */
 static struct ust_app_list ust_app_list = {
        .head = CDS_LIST_HEAD_INIT(ust_app_list.head),
@@ -173,6 +175,8 @@ void ust_app_unregister(int sock)
 {
        struct ust_app *lta;
 
+       tracepoint(ust_unregister_start);
+
        ust_app_lock_list();
        lta = find_app_by_sock(sock);
        if (lta) {
@@ -182,6 +186,8 @@ void ust_app_unregister(int sock)
                free(lta);
        }
        ust_app_unlock_list();
+
+       tracepoint(ust_unregister_stop);
 }
 
 /*
This page took 0.029335 seconds and 4 git commands to generate.