From: jp_ikaheimonen@mentor.com (JP Ikaheimonen)
Subject: [lttng-dev] [PATCH lttng-ust 5/7] Store exclusions to enablers
Date: Thu, 7 Nov 2013 12:22:33 +0200 [thread overview]
Message-ID: <1383819755-6891-6-git-send-email-jp_ikaheimonen@mentor.com> (raw)
In-Reply-To: <1383819755-6891-1-git-send-email-jp_ikaheimonen@mentor.com>
Implement a function that adds exclusions to the list in the enabler.
Call this function in the enabler command handler when the
LTTNG_UST_EXCLUSION command is received.
Signed-off-by: JP Ikaheimonen <jp_ikaheimonen at mentor.com>
---
include/lttng/ust-events.h | 2 ++
liblttng-ust/lttng-events.c | 9 +++++++++
liblttng-ust/lttng-ust-abi.c | 7 +++++++
3 files changed, 18 insertions(+)
diff --git a/include/lttng/ust-events.h b/include/lttng/ust-events.h
index db8b9dc..5d43570 100644
--- a/include/lttng/ust-events.h
+++ b/include/lttng/ust-events.h
@@ -549,6 +549,8 @@ int lttng_enabler_attach_bytecode(struct lttng_enabler *enabler,
struct lttng_ust_filter_bytecode_node *bytecode);
int lttng_enabler_attach_context(struct lttng_enabler *enabler,
struct lttng_ust_context *ctx);
+int lttng_enabler_attach_exclusion(struct lttng_enabler *enabler,
+ struct lttng_ust_excluder_node *excluder);
int lttng_attach_context(struct lttng_ust_context *context_param,
struct lttng_ctx **ctx, struct lttng_session *session);
diff --git a/liblttng-ust/lttng-events.c b/liblttng-ust/lttng-events.c
index ad374f3..915cffb 100644
--- a/liblttng-ust/lttng-events.c
+++ b/liblttng-ust/lttng-events.c
@@ -721,6 +721,15 @@ int lttng_enabler_attach_bytecode(struct lttng_enabler *enabler,
return 0;
}
+int lttng_enabler_attach_exclusion(struct lttng_enabler *enabler,
+ struct lttng_ust_excluder_node *excluder)
+{
+ excluder->enabler = enabler;
+ cds_list_add_tail(&excluder->node, &enabler->excluder_head);
+ lttng_session_lazy_sync_enablers(enabler->chan->session);
+ return 0;
+}
+
int lttng_attach_context(struct lttng_ust_context *context_param,
struct lttng_ctx **ctx, struct lttng_session *session)
{
diff --git a/liblttng-ust/lttng-ust-abi.c b/liblttng-ust/lttng-ust-abi.c
index a852aae..61245a8 100644
--- a/liblttng-ust/lttng-ust-abi.c
+++ b/liblttng-ust/lttng-ust-abi.c
@@ -933,6 +933,8 @@ static const struct lttng_ust_objd_ops lttng_channel_ops = {
* Disable recording for this enabler
* LTTNG_UST_FILTER
* Attach a filter to an enabler.
+ * LTTNG_UST_EXCLUSION
+ * Attach exclusions to an enabler.
*/
static
long lttng_enabler_cmd(int objd, unsigned int cmd, unsigned long arg,
@@ -958,6 +960,11 @@ long lttng_enabler_cmd(int objd, unsigned int cmd, unsigned long arg,
return ret;
return 0;
}
+ case LTTNG_UST_EXCLUSION:
+ {
+ return lttng_enabler_attach_exclusion(enabler,
+ (struct lttng_ust_excluder_node *) arg);
+ }
default:
return -EINVAL;
}
--
1.8.1.2
next prev parent reply other threads:[~2013-11-07 10:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-07 10:22 [lttng-dev] [PATCH lttng-ust 0/7] UST Event exclusions JP Ikaheimonen
2013-11-07 10:22 ` [lttng-dev] [PATCH lttng-ust 1/7] Define a new command LTTNG_UST_EXCLUSION JP Ikaheimonen
2013-11-07 10:22 ` [lttng-dev] [PATCH lttng-ust 2/7] Define exclusion structure for UST ABI JP Ikaheimonen
2013-11-07 10:22 ` [lttng-dev] [PATCH lttng-ust 3/7] Send exclusion data through ustcomm JP Ikaheimonen
2013-11-07 10:22 ` [lttng-dev] [PATCH lttng-ust 4/7] Add excluders to enabler structure JP Ikaheimonen
2013-11-07 10:22 ` JP Ikaheimonen [this message]
2013-11-07 10:22 ` [lttng-dev] [PATCH lttng-ust 6/7] Add handler for LTTNG_UST_EXCLUSION in UST ABI JP Ikaheimonen
2013-11-07 10:22 ` [lttng-dev] [PATCH lttng-ust 7/7] Add a check against excluders JP Ikaheimonen
2013-11-13 14:05 ` Mathieu Desnoyers
2013-11-13 20:25 ` Mathieu Desnoyers
2013-11-14 7:26 ` Ikaheimonen, JP
2013-11-14 14:25 ` Mathieu Desnoyers
2013-11-14 14:26 ` Ikaheimonen, JP
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1383819755-6891-6-git-send-email-jp_ikaheimonen@mentor.com \
--to=jp_ikaheimonen@mentor.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox