History log of /external/fio/exp/expression-parser.l
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
79dc914fcf76e8f6c8f8e20dc75bd424cc833d27 11-Nov-2014 Stephen M. Cameron <stephenmcameron@gmail.com> Fixup some of the time (usec) based conversions

Modified by Jens to fixup some of the mtime/utime confusion,
and add a specific ->is_time to options to get rid of future
issues in this area.

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/exp/expression-parser.l
e2e7032c8091c3b85c2d55df4dea6e1575280ccc 15-Oct-2014 Jens Axboe <axboe@fb.com> Get rid if --header-file argument for lex

Since we now wrap the lexer_input() call, should be safe to just
get rid of the lexer.h define since we don't need size_t/yy_size_t.

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/exp/expression-parser.l
4ce8aba2ddf28d5ae7cdf00a5942bda0d478388d 07-Oct-2014 Jens Axboe <axboe@fb.com> exp: small code cleanup

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/exp/expression-parser.l
e34042657a56368d8515b9875b4d7e5529353425 07-Oct-2014 Jens Axboe <axboe@fb.com> exp: fix issues around int vs size_t

This seems to be the easiest way - just wrap the call in a
macro that always passes a size_t, then it doesn't matter what
yy_n_chars is typed as (int or size_t).

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/exp/expression-parser.l
5abaf3e2bf055bcda13c51aa27fe8fa955253dc4 03-Oct-2014 Stephen M. Cameron <stephenmcameron@gmail.com> make expression parser handle scientific notation

Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/exp/expression-parser.l
a22867a5305f5cba020d6825793de9b9aaca1ca8 30-Sep-2014 Stephen M. Cameron <stephenmcameron@gmail.com> remove unused bye symbol from arithmetic parser

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/exp/expression-parser.l
64c9d60b95a121b4d7a4ca3b0fdf2390236d17b2 30-Sep-2014 Stephen M. Cameron <stephenmcameron@gmail.com> enable informing arithmetic parser of implicit units

This is so that "runtime=100" can be interpreted as 100 seconds
rather than 100 microseconds, but runtime=(100ms + 100s) can also
get the right answer (in microseconds).

Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/exp/expression-parser.l
303b5cad3b9191577dde666d1988c512b5e55080 30-Sep-2014 Stephen M. Cameron <stephenmcameron@gmail.com> Treat colons and commas as end of input in expression parser

Just like a comment. This is to allow processing of lists
of numbers separated by colons or commas. Also, fix the comment
processing to require zero rather than one character after '#'

Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/exp/expression-parser.l
ded6ec28773a2071c9e958fdb02e359ff031f85d 29-Sep-2014 Jens Axboe <axboe@fb.com> fio: support modulus for the arithmetic parser

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/exp/expression-parser.l
4fe690ef0159ae0e8f287293c2ea04566a6a58d0 29-Sep-2014 Stephen M. Cameron <stephenmcameron@gmail.com> fio: support exponentiation in expression parser

Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/exp/expression-parser.l
c3805eb1451972285565504e11be642f082fe7df 29-Sep-2014 Stephen M. Cameron <stephenmcameron@gmail.com> fio: support suffixes in expression parser

Note that time values in expressions by default have units of microseconds

Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/exp/expression-parser.l
88b635b84d831b109f0807922449fa7a900f5dbd 29-Sep-2014 Stephen M. Cameron <stephenmcameron@gmail.com> fio: allow arithmetic expressions to be used in job files

However, the arithmetic expressions must be enclosed in parentheses.
That is not a hard requirement, I just did it that way to enable the old
code to be used for the existing job files, to reduce risk of breaking
something that previously worked.

Known issues:

1) if overflow or underflow occurs during the evaluation of arithmetic
expressions, it is not detected. Likewise, detection of floating point
divide by zero is a bit iffy. Calculations are carried out both as long
longs and as integers. If at any point, a double precision floating
point value is used, floating point values are used, and for the final
long long calculation the double is cast to a long long.

There may be other numeric subtleties lurking as well. These kind of
things are why I require the parentheses to invoke the arithmetic
processing.

2) I made no effort to work this code into the autoconf system. Have no
idea how to do that, esp. with lex and yacc involved in this.

3) Suffixes (k, M, GiB, etc.) do not work with expressions. It is
probably not very difficult to fix this.

Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>

Modified by me to make configure auto-detect presence of yacc/lex and
enable the arithmetic only if those conditions are met. Also got rid
of the Makefile in exp/ and added the targets to the general Makefile,
since this makes it easier to do properly.

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/exp/expression-parser.l