[lttng-dev] [PATCH lttng-tools] utils: Rework utils_parse_size_suffix

2014-04-10 Thread Simon Marchi
Ok, so there are a lot of problems with this function (sorry :|). Taking the regex road is probably to complicated for nothing, so here is a version without regexes. I added many test cases as suggested by Sandeep Chaudhary and Daniel Thibault. I tested on both Intel 32 and 64 bits. Would fix

Re: [lttng-dev] [PATCH lttng-tools] utils: Rework utils_parse_size_suffix

2014-04-10 Thread Thibault, Daniel
-- Date: Thu, 10 Apr 2014 11:30:19 -0400 From: Simon Marchi simon.mar...@polymtl.ca +++ b/src/common/utils.c @@ -650,42 +649,10 @@ error: [...] * The suffix multiply the integer by: Should be The suffixes multiply the

Re: [lttng-dev] [PATCH lttng-tools] utils: Rework utils_parse_size_suffix

2014-04-10 Thread Simon Marchi
Thanks for the comments. @@ -693,83 +660,94 @@ static void regex_print_error(int errcode, regex_t *regex) [...] + /* strtoull will accept a negative number, but we don't want to. */ + if (strchr(str, '-') != NULL) { + DBG(utils_parse_size_suffix: invalid size

[lttng-dev] Babeltrace API question - how can I quickly return to rhe first event in the current packet?

2014-04-10 Thread Amit Margalit
Hello, I am trying to implement a wrapper to libbabeltrace.so, to provide backward iteration capability. I've already implemented a binary search in lib/iterator.c, in seek_file_stream_by_timestamp() - which helps a lot when doing any kind of seek. I intend to donate this patch, pretty soon.

Re: [lttng-dev] [PATCH lttng-tools] Backported to glibc 2.8

2014-04-10 Thread David Goulet
Hi Jesper, Code wise, this looks good but I can't test that feature since glibc 2.8 is kind of *old* and I have no system to test that. Could you provide me a Tested-by: string and I'll trust you words that you did a make check on a glibc 2.8. Thanks! David On 27 Mar (14:38:52),

Re: [lttng-dev] [PATCH lttng-tools] Add MIT license header to session.xsd

2014-04-10 Thread David Goulet
Merged! On 07 Apr (11:47:37), Jérémie Galarneau wrote: Signed-off-by: Jérémie Galarneau jeremie.galarn...@efficios.com --- src/common/config/session.xsd | 21 + 1 file changed, 21 insertions(+) diff --git a/src/common/config/session.xsd b/src/common/config/session.xsd

Re: [lttng-dev] [PATCH lttng-tools] utils: Rework utils_parse_size_suffix

2014-04-10 Thread David Goulet
On 10 Apr (11:30:19), Simon Marchi wrote: Ok, so there are a lot of problems with this function (sorry :|). Taking the regex road is probably to complicated for nothing, so here is a version without regexes. I added many test cases as suggested by Sandeep Chaudhary and Daniel Thibault. I

Re: [lttng-dev] [PATCH lttng-tools] utils: Rework utils_parse_size_suffix

2014-04-10 Thread Simon Marchi
On 10 April 2014 15:57, David Goulet dgou...@efficios.com wrote: On 10 Apr (11:30:19), Simon Marchi wrote: Ok, so there are a lot of problems with this function (sorry :|). Taking the regex road is probably to complicated for nothing, so here is a version without regexes. I added many test

Re: [lttng-dev] [PATCH lttng-tools] utils: Rework utils_parse_size_suffix

2014-04-10 Thread Thibault, Daniel
-- Date: Thu, 10 Apr 2014 14:43:38 -0400 From: Simon Marchi simon.mar...@polymtl.ca Should be [...] should not begin with '-' [...] (although it is true the size string should not *contain*, the test is only for *begins

[lttng-dev] [PATCH] Fix: XML declaration must be at beginning of XSD file

2014-04-10 Thread Christian Babeux
Move down license information to fix the parser error : XML declaration allowed only at the start of the document Signed-off-by: Christian Babeux christian.bab...@efficios.com --- src/common/config/session.xsd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[lttng-dev] [PATCH lttng-tools 1/2] Override the session.xsd path with an environment variable

2014-04-10 Thread Jérémie Galarneau
The LTTNG_SESSION_CONFIG_XSD_PATH environment variable can be used to specify a path which contains the session configuration schema. This will allow save-load tests to be ran without installing the XSD on the system. Signed-off-by: Jérémie Galarneau jeremie.galarn...@efficios.com ---

[lttng-dev] [PATCH lttng-tools 2/2] Use the in-tree session.xsd in test_load

2014-04-10 Thread Jérémie Galarneau
Signed-off-by: Jérémie Galarneau jeremie.galarn...@efficios.com --- tests/regression/tools/save-load/test_load | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/regression/tools/save-load/test_load b/tests/regression/tools/save-load/test_load index d660878..c746a5c 100755 ---