const char * const config_domain_type_ust = "UST";
const char * const config_domain_type_jul = "JUL";
const char * const config_domain_type_log4j = "LOG4J";
+const char * const config_domain_type_python = "PYTHON";
const char * const config_buffer_type_per_pid = "PER_PID";
const char * const config_buffer_type_per_uid = "PER_UID";
ret = LTTNG_DOMAIN_JUL;
} else if (!strcmp((char *) domain, config_domain_type_log4j)) {
ret = LTTNG_DOMAIN_LOG4J;
+ } else if (!strcmp((char *) domain, config_domain_type_python)) {
+ ret = LTTNG_DOMAIN_PYTHON;
} else {
goto error;
}
xmlNodePtr perf_attr_node;
/* perf */
- context.ctx = LTTNG_EVENT_CONTEXT_PERF_COUNTER;
+ context.ctx = handle->domain.type == LTTNG_DOMAIN_KERNEL ?
+ LTTNG_EVENT_CONTEXT_PERF_CPU_COUNTER :
+ LTTNG_EVENT_CONTEXT_PERF_THREAD_COUNTER;
for (perf_attr_node = xmlFirstElementChild(context_child_node);
perf_attr_node; perf_attr_node =
xmlNextElementSibling(perf_attr_node)) {
struct lttng_domain *ust_domain = NULL;
struct lttng_domain *jul_domain = NULL;
struct lttng_domain *log4j_domain = NULL;
+ struct lttng_domain *python_domain = NULL;
for (node = xmlFirstElementChild(session_node); node;
node = xmlNextElementSibling(node)) {
}
log4j_domain = domain;
break;
+ case LTTNG_DOMAIN_PYTHON:
+ if (python_domain) {
+ /* Same domain seen twice, invalid! */
+ goto domain_init_error;
+ }
+ python_domain = domain;
+ break;
default:
WARN("Invalid domain type");
goto domain_init_error;
free(ust_domain);
free(jul_domain);
free(log4j_domain);
+ free(python_domain);
free(name);
return ret;
}