for (i = 0; i < nb_calib; i++) {
freq += (double) get_cpu_freq();
}
+
return (freq / (double)nb_calib);
}
total += res;
+ if (time_ust_notify_apps_start == 0 || time_ust_notify_apps_stop == 0) {
+ goto no_data;
+ }
+
+ res = get_bench_time(time_ust_notify_apps_start,
+ time_ust_notify_apps_stop);
+ fprintf(fp, "futex wake\n");
+ fprintf(fp, "Time: %.20f sec.\n", res);
+
+ total += res;
+
fprintf(fp, "Global UST nonification time\n");
fprintf(fp, "Time: %.20f sec.\n", total);
return;
DBG("Notifying applications of session daemon state: %d", active);
- tracepoint(ust_notify_apps_start);
-
/* See shm.c for this call implying mmap, shm and futex calls */
wait_shm_mmap = shm_ust_get_mmap(wait_shm_path, is_root);
if (wait_shm_mmap == NULL) {
goto error;
}
+ tracepoint(ust_notify_apps_start);
+
/* Wake waiting process */
futex_wait_update((int32_t *) wait_shm_mmap, active);
ERR("Apps command pipe error");
goto error;
} else if (revents & LPOLLIN) {
+ system("sysctl vm.drop_caches=3");
tracepoint(ust_register_read_start);
/* Empty pipe */
ret = read(apps_cmd_pipe[0], &ust_cmd, sizeof(ust_cmd));
}
tracepoint(ust_register_add_stop);
- tracepoint(ust_register_done_start);
/*
* Validate UST version compatibility.
*/
update_ust_app(ust_cmd.sock);
}
+ tracepoint(ust_register_done_start);
ret = ust_app_register_done(ust_cmd.sock);
if (ret < 0) {
/*
*/
ust_app_unregister(ust_cmd.sock);
} else {
+ tracepoint(ust_register_done_stop);
/*
* We just need here to monitor the close of the UST
* socket and poll set monitor those by default.
DBG("Apps with sock %d added to poll set",
ust_cmd.sock);
}
- tracepoint(ust_register_done_stop);
break;
}
} else {