SoW-2020-0002: Trace Hit Counters: trigger error reporting integration
[lttng-tools.git] / src / common / event-rule / event-rule.c
index cdf3e0dedbea19b357fcb68a8342a26cf27c44ef..20731ec65b21e1515d276bb13de12cfd0d1a2bcc 100644 (file)
@@ -248,7 +248,7 @@ const char *lttng_event_rule_get_filter(const struct lttng_event_rule *rule)
 }
 
 LTTNG_HIDDEN
-const struct lttng_filter_bytecode *lttng_event_rule_get_filter_bytecode(
+const struct lttng_bytecode *lttng_event_rule_get_filter_bytecode(
                const struct lttng_event_rule *rule)
 {
        assert(rule->get_filter_bytecode);
@@ -264,6 +264,36 @@ struct lttng_event_exclusion *lttng_event_rule_generate_exclusions(
 }
 
 LTTNG_HIDDEN
+struct lttng_event *lttng_event_rule_generate_lttng_event(
+               const struct lttng_event_rule *rule)
+{
+       assert(rule->generate_lttng_event);
+       return rule->generate_lttng_event(rule);
+}
+
+LTTNG_HIDDEN
+bool lttng_event_rule_is_agent(const struct lttng_event_rule *rule)
+{
+       bool ret = false;
+       enum lttng_domain_type type = lttng_event_rule_get_domain_type(rule);
+
+       switch (type) {
+       case LTTNG_DOMAIN_JUL:
+       case LTTNG_DOMAIN_LOG4J:
+       case LTTNG_DOMAIN_PYTHON:
+               ret = true;
+               break;
+       case LTTNG_DOMAIN_UST:
+       case LTTNG_DOMAIN_KERNEL:
+               ret = false;
+               break;
+       default:
+               assert(0);
+       };
+
+       return ret;
+}
+
 const char *lttng_event_rule_type_str(enum lttng_event_rule_type type)
 {
        switch (type) {
This page took 0.033427 seconds and 5 git commands to generate.