#include "lttng-ust-statedump.h"
#include "jhash.h"
#include "getenv.h"
+#include "compat.h"
#define TRACEPOINT_DEFINE
#include "ust_lib.h" /* Only define. */
bin_data->dbg_file, bin_data->crc);
}
+static
+void procname_cb(struct lttng_session *session, void *priv)
+{
+ char *procname = (char *) priv;
+ tracepoint(lttng_ust_statedump, procname, session, procname);
+}
+
static
void trace_start_cb(struct lttng_session *session, void *priv)
{
*/
for (i = 0; i < UST_DL_STATE_TABLE_SIZE; i++) {
struct cds_hlist_head *head;
- struct lttng_ust_dl_node *e;
+ struct lttng_ust_dl_node *e, *tmp;
head = &dl_state_table[i];
- cds_hlist_for_each_entry_2(e, head, node) {
+ cds_hlist_for_each_entry_safe_2(e, tmp, head, node) {
if (e->marked) {
if (!e->traced) {
trace_lib_load(&e->bin_data, ip);
return 0;
}
+static
+int do_procname_statedump(void *owner)
+{
+ if (lttng_getenv("LTTNG_UST_WITHOUT_PROCNAME_STATEDUMP"))
+ return 0;
+
+ trace_statedump_event(procname_cb, owner, lttng_ust_sockinfo_get_procname(owner));
+ return 0;
+}
+
/*
* Generate a statedump of a given traced application. A statedump is
* delimited by start and end events. For a given (process, session)
trace_statedump_start(owner);
ust_unlock();
+ do_procname_statedump(owner);
do_baddr_statedump(owner);
ust_lock_nocheck();