Re: [lttng-dev] [PATCH lttng-tools] lttng cli: Accept human readable sizes for --subbuf-size

2013-04-03 Thread Christian Babeux
Hi Simon, I preferred not to use extended regex. + and ? is included in the extended posix regexes [1]. I also prefer [0-9] over [:digit:], because it is as clear and less characters, but I don't mind :). Alright, let's go with the one using basic POSIX regexes. atol() can return negative

Re: [lttng-dev] lttng-tools test suite problem

2013-04-03 Thread Christian Babeux
Hi Simon, A- Create a folder for each unit test. This is cumbersome, because it will require creating a Makefile in each directory, which requires to modify configure.ac. If it's hard to add a test, there will be less tests, which is bad. Also, a single test that needs stuff from two

Re: [lttng-dev] Error using add-context for perf counters

2013-04-03 Thread Matthew Khouzam
Hi, I can confirm this bug, Has anyone else tried it? On 13-03-19 03:03 PM, Bernd Hufmann wrote: Hello I cannot add contexts for perf counters using lttng-tools v2.1.1 and I get an error (see below). When using lttng-tools 2.0.5 (on a different computer) it works. Could somebody from lttng

Re: [lttng-dev] lttng-tools test suite problem

2013-04-03 Thread Simon Marchi
On 3 April 2013 12:49, Christian Babeux christian.bab...@efficios.com wrote: I would advocate for this option. Could you describe the issues you encountered using subdirs-objects? Let's try to add AUTOMAKE_OPTIONS = subdir-objects at the top of tests/unit/Makefile.am. ./bootstrap and

Re: [lttng-dev] lttng-tools test suite problem

2013-04-03 Thread Simon Marchi
On 3 April 2013 14:28, Simon Marchi simon.mar...@polymtl.ca wrote: Finally, an idea just like that: instead of specifying the source file, would it be possible to specify directly the object file (e.g. $(top_srcdir)/src/bin/lttng/utils.o or ../../src/bin/lttng/utils.o) in LDADD ? So the unit

Re: [lttng-dev] [PATCH lttng-tools] lttng cli: Accept human readable sizes for --subbuf-size

2013-04-03 Thread Thibault, Daniel
--subbuf-size accepts sizes such as: - 123 - 123 - 123k or 123K - 123 * 1024 - 123m or 123M - 123 * 1024 * 1024 - 123g or 123G - 123 * 1024 * 1024 * 1024 I don't really like using non-SI prefixes such as K, m or g (well, in fact m is an SI prefix but for milli, not mega). I think that

Re: [lttng-dev] [PATCH lttng-tools] lttng cli: Accept human readable sizes for --subbuf-size

2013-04-03 Thread Simon Marchi
Normally I'd be the first to advocate k, M, G as powers of 10 and Ki, Mi, Gi as powers of two (ISO/IEC 8-13:2008) but the kernel parameters use exclusively K, M, and G in the powers of two sense, and I believe just about every other part of Linux does also. We should thus, somewhat

Re: [lttng-dev] [PATCH lttng-tools] lttng cli: Accept human readable sizes for --subbuf-size

2013-04-03 Thread Raphaƫl Beamonte
2013/4/3 Simon Marchi simon.mar...@polymtl.ca Normally I'd be the first to advocate k, M, G as powers of 10 and Ki, Mi, Gi as powers of two (ISO/IEC 8-13:2008) but the kernel parameters use exclusively K, M, and G in the powers of two sense, and I believe just about every other part

[lttng-dev] [PATCH v2 lttng-tools] lttng cli: Accept human readable sizes for --subbuf-size

2013-04-03 Thread Simon Marchi
--subbuf-size accepts sizes such as: - 123 - 123 - 123k - 123 * 1024 - 123M - 123 * 1024 * 1024 - 123G - 123 * 1024 * 1024 * 1024 It uses the new parse_human_size function, which could probably be used at other places, such as tracefile size. I wanted to add some unit tests for

Re: [lttng-dev] [PATCH v2 lttng-tools] lttng cli: Accept human readable sizes for --subbuf-size

2013-04-03 Thread Simon Marchi
Forgot to mention changes in v2: * Use single exit point * Use intermediate variables in size * Change atoll to strtoll and add error check * Changed return type to int * Change result size type to uint64_t (matches LTTng type) * Modify popt subbuf-size argument type to string Thanks, Simon On