From: nils.carlson@ericsson.com (Nils Carlson)
Subject: [ltt-dev] [UST PATCH] Include trace name in output directory name
Date: Mon, 8 Nov 2010 16:34:39 +0100 [thread overview]
Message-ID: <1289230479-26815-1-git-send-email-nils.carlson@ericsson.com> (raw)
Include the name of the trace to the output directory created by
ustd. Yet another part of multi-session support.
Signed-off-by: Nils Carlson <nils.carlson at ericsson.com>
---
ustd/ustd.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/ustd/ustd.c b/ustd/ustd.c
index e75fd9d..3f63457 100644
--- a/ustd/ustd.c
+++ b/ustd/ustd.c
@@ -191,9 +191,9 @@ int on_open_buffer(struct libustd_callbacks *data, struct buffer_info *buf)
trace_path = USTD_DEFAULT_TRACE_PATH;
}
- if (asprintf(&tmp, "%s/%u_%lld", trace_path, buf->pid, buf->pidunique) < 0) {
- ERR("on_open_buffer : asprintf failed (%s/%u_%lld)",
- trace_path, buf->pid, buf->pidunique);
+ if (asprintf(&tmp, "%s/%u_%s_%lld", trace_path, buf->pid, buf->trace, buf->pidunique) < 0) {
+ ERR("on_open_buffer : asprintf failed (%s/%u_%s_%lld)",
+ trace_path, buf->pid, buf->trace, buf->pidunique);
return 1;
}
result = create_dir_if_needed(tmp);
@@ -204,9 +204,9 @@ int on_open_buffer(struct libustd_callbacks *data, struct buffer_info *buf)
}
free(tmp);
- if (asprintf(&tmp, "%s/%u_%lld/%s", trace_path, buf->pid, buf->pidunique, buf->name) < 0) {
- ERR("on_open_buffer : asprintf failed (%s/%u_%lld/%s)",
- trace_path, buf->pid, buf->pidunique, buf->name);
+ if (asprintf(&tmp, "%s/%u_%s_%lld/%s", trace_path, buf->pid, buf->trace, buf->pidunique, buf->name) < 0) {
+ ERR("on_open_buffer : asprintf failed (%s/%u_%s_%lld/%s)",
+ trace_path, buf->pid, buf->trace, buf->pidunique, buf->name);
return 1;
}
result = fd = open(tmp, O_WRONLY | O_CREAT | O_TRUNC | O_EXCL, 00600);
--
1.7.1
next reply other threads:[~2010-11-08 15:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-08 15:34 Nils Carlson [this message]
2010-11-09 16:37 ` David Goulet
2010-11-09 18:01 ` Nils Carlson
2010-11-09 19:17 ` David Goulet
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=1289230479-26815-1-git-send-email-nils.carlson@ericsson.com \
--to=nils.carlson@ericsson.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