From: gbastien+lttng@versatic.net (Geneviève Bastien)
Subject: [lttng-dev] [RFC Patch Tools 1/3] Update data structures to support CTF global structures
Date: Wed, 26 Mar 2014 10:55:10 -0400 [thread overview]
Message-ID: <1395845712-18498-2-git-send-email-gbastien+lttng@versatic.net> (raw)
In-Reply-To: <1395845712-18498-1-git-send-email-gbastien+lttng@versatic.net>
It also adds appropriate data structures to describe a structure field in
tracepoints.
Signed-off-by: Genevi?ve Bastien <gbastien+lttng at versatic.net>
---
src/bin/lttng-sessiond/lttng-ust-ctl.h | 14 ++++++++++++++
src/bin/lttng-sessiond/ust-registry.c | 1 +
2 files changed, 15 insertions(+)
diff --git a/src/bin/lttng-sessiond/lttng-ust-ctl.h b/src/bin/lttng-sessiond/lttng-ust-ctl.h
index 379260d..9a13fd9 100644
--- a/src/bin/lttng-sessiond/lttng-ust-ctl.h
+++ b/src/bin/lttng-sessiond/lttng-ust-ctl.h
@@ -244,6 +244,7 @@ enum ustctl_abstract_types {
ustctl_atype_sequence,
ustctl_atype_string,
ustctl_atype_float,
+ ustctl_atype_structure,
NR_USTCTL_ABSTRACT_TYPES,
};
@@ -314,6 +315,9 @@ struct ustctl_type {
struct ustctl_basic_type length_type;
struct ustctl_basic_type elem_type;
} sequence;
+ struct {
+ char name[LTTNG_UST_SYM_NAME_LEN];
+ } structure;
char padding[USTCTL_UST_TYPE_PADDING];
} u;
} LTTNG_PACKED;
@@ -327,9 +331,18 @@ struct ustctl_enum {
char padding[USTCTL_UST_ENUM_TYPE_PADDING];
} LTTNG_PACKED;
+#define USTCTL_UST_STRUCT_TYPE_PADDING 368
+struct ustctl_structure {
+ char name[LTTNG_UST_SYM_NAME_LEN];
+ size_t nr_fields;
+ struct ustctl_field *fields;
+ char padding[USTCTL_UST_STRUCT_TYPE_PADDING];
+} LTTNG_PACKED;
+
/* CTF categories for global types declared outside event descriptions */
enum ustctl_global_type_categories {
ustctl_mtype_enum,
+ ustctl_mtype_structure,
NR_USTCTL_GLOBAL_TYPES,
};
@@ -338,6 +351,7 @@ struct ustctl_global_type_decl {
uint32_t mtype;
union {
struct ustctl_enum ctf_enum;
+ struct ustctl_structure ctf_structure;
char padding[USTCTL_UST_GLOBAL_TYPE_DECL_PADDING];
} u;
} LTTNG_PACKED;
diff --git a/src/bin/lttng-sessiond/ust-registry.c b/src/bin/lttng-sessiond/ust-registry.c
index 8b58b25..6fd2f3b 100644
--- a/src/bin/lttng-sessiond/ust-registry.c
+++ b/src/bin/lttng-sessiond/ust-registry.c
@@ -135,6 +135,7 @@ int validate_event_field(struct ustctl_field *field,
case ustctl_atype_array:
case ustctl_atype_sequence:
case ustctl_atype_string:
+ case ustctl_atype_structure:
break;
case ustctl_atype_float:
--
1.9.1
next prev parent reply other threads:[~2014-03-26 14:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-26 14:55 [lttng-dev] Add support of CTF structure global type Geneviève Bastien
2014-03-26 14:55 ` Geneviève Bastien [this message]
2014-03-26 14:55 ` [lttng-dev] [RFC Patch Tools 2/3] Statedump the metadata for the CTF global structures Geneviève Bastien
2014-03-26 14:55 ` [lttng-dev] [RFC Patch Tools 3/3] Update regression tests for UST global structure declarations Geneviève Bastien
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=1395845712-18498-2-git-send-email-gbastien+lttng@versatic.net \
--to=gbastien+lttng@versatic.net \
/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