Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: mathieu.desnoyers@efficios.com (Mathieu Desnoyers)
Subject: [lttng-dev] [Patch LTTng-ust 6/7] Add the macros to generate the data structures for CTF named enumerations
Date: Mon, 3 Feb 2014 16:17:31 +0000 (UTC)	[thread overview]
Message-ID: <627045971.18225.1391444251887.JavaMail.zimbra@efficios.com> (raw)
In-Reply-To: <52EFB89A.6040905@mentor.com>

----- Original Message -----
> From: "Stefan Seefeld" <stefan_seefeld@mentor.com>
> To: "Mathieu Desnoyers" <mathieu.desnoyers at efficios.com>
> Cc: lttng-dev at lists.lttng.org
> Sent: Monday, February 3, 2014 10:41:14 AM
> Subject: Re: [lttng-dev] [Patch LTTng-ust 6/7] Add the macros to generate the data structures for CTF named
> enumerations
> 
> On 02/03/2014 10:28 AM, Mathieu Desnoyers wrote:
> 
> > Hi Stefan,
> > 
> > Let's try to make sure I understand your intent here. Let's say we have
> > an event with a "weight" field (uint32_t). You would like to have
> > a multiplicative factor (e.g. *1000 for "kg") as a second field, that would
> > be entirely known from the metadata (pretty much a C literal in the
> > metadata,
> > so it does not have to be repeated for each event).
> 
> Right. The analogy with a C literal isn't entirely sufficient, as there
> is a range of situations where in fact "constant" doesn't map to
> compile-time constant in C/C++. Thus...

Can you provide a concrete example of what you envision ? What would
this look like an an "extended" CTF metadata ?

Thanks,

Mathieu

> 
> > There are various ways to do this I imagine: e.g.:
> > 
> > * Using the typing system
> 
> 
> [...]
> 
> ...the typing system can't quite capture values that are immutable
> within a running session, but not quite constant in the sense that they
> can be captured in a type system.
> 
> So perhaps another way to look at it is like a static class member, for
> which storage isn't part of each instance of the class, but rather
> somewhere that's associated with all instances of the class...
> 
> > But I don't see anything there that requires adding any top-level construct
> > to the CTF metadata.
> 
> ...and that "somewhere" would naturally be the metadata section of the
> traces.
> 
> > Hence, I am tempted to keep the name "global type declaration"
> > for the part of metadata located in the "global" section (opposed to within
> > a
> > trace, env, stream, and event scope). Anyway, all we can declare there are
> > types,
> > so it makes sense to use this name. If we ever add something to the CTF
> > spec in the
> > future that is global but is not a type, then we'll have to extend the
> > interfaces
> > and implementations (which should be expected if we extend the CTF spec).
> 
> Right. I wasn't arguing so much against the use of "global type
> declaration" for the case of named enums, but merely wanted to point out
> that the mechanism could be extended to cover non-type-related metadata.
> 
> Thanks,
> 		Stefan
> 
> 
> --
> Stefan Seefeld
> CodeSourcery / Mentor Graphics
> http://www.mentor.com/embedded-software/
> 

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com



  reply	other threads:[~2014-02-03 16:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1390593885-7463-1-git-send-email-gbastien+lttng@versatic.net>
     [not found] ` <1390593885-7463-7-git-send-email-gbastien+lttng@versatic.net>
     [not found]   ` <1490865069.16181.1391132259063.JavaMail.zimbra@efficios.com>
     [not found]     ` <52EB0287.4000105@mentor.com>
2014-02-03 15:28       ` Mathieu Desnoyers
2014-02-03 15:41         ` Stefan Seefeld
2014-02-03 16:17           ` Mathieu Desnoyers [this message]
     [not found] ` <1390593885-7463-2-git-send-email-gbastien+lttng@versatic.net>
     [not found]   ` <2139172576.16061.1391123211482.JavaMail.zimbra@efficios.com>
     [not found]     ` <52EC0746.2020200@versatic.net>
2014-02-03 15:31       ` [lttng-dev] [Patch LTTng-ust 1/7] Add or update data structures to support CTF named metadata Mathieu Desnoyers
2014-02-11 21:35 ` [lttng-dev] LTTng-ust: Add support of global types and CTF enumerations Geneviève Bastien
2014-02-11 21:35   ` [lttng-dev] [Patch LTTng-ust v2 1/7] Update data structures to support CTF global type declarations Geneviève Bastien
2014-02-11 21:35   ` [lttng-dev] [Patch LTTng-ust v2 2/7] Add empty macros to support CTF global enumerations Geneviève Bastien
2014-02-11 21:35   ` [lttng-dev] [Patch LTTng-ust v2 3/7] Add an example using CTF global type enumerations Geneviève Bastien
2014-02-11 21:35   ` [lttng-dev] [Patch LTTng-ust v2 4/7] Serialize the CTF global enumerations data structures for ust-comm Geneviève Bastien
2014-02-11 21:35   ` [lttng-dev] [Patch LTTng-ust v2 5/7] Send and receive serialized data for CTF global enumerations Geneviève Bastien
2014-02-11 21:35   ` [lttng-dev] [Patch LTTng-ust v2 6/7] Add the macros to generate the data structures " Geneviève Bastien
2014-02-11 21:35   ` [lttng-dev] [Patch LTTng-ust v2 7/7] Update the LTTng documentation with " 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=627045971.18225.1391444251887.JavaMail.zimbra@efficios.com \
    --to=mathieu.desnoyers@efficios.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