vcs.slashdirt.org Git - sw/tic2json.git/log
Further split out parser from output producer
rename tic2json.h -> tic.h
minor cleanup no code change
make filter_mode a bool
hook both versions
Makefile: prepare to support multiple versions
parser v02: disambiguate parse_config
Add lexer/parser for v01
ticv02: add prefixes to lexer/parser
rename tic2json.y to ticv02.y
carve out output formatting from the parser
rename tic2json.l to ticv02.l
Update ChangeLog
bump version number
parser: add option to decode STGE
parser: static local functions
parser: report frame status in dictionary mode
add ChangeLog
clarify filter file format
parser: implement idtag
useful to tag data from different meters
Introduce version number, simplify usage() prototype
parser: cleanup frame handling
minor reformat
add README
introduce pr_err() and BAREBUILD
rename and improve makefile
parser: hooked logic is unnecessary
The grammar is properly written :)
parser: one less global variable
parser: reduce unnecessary calls
parser: simplify grammar
first pass at improving memory footprint
down to 24KB and 8KB heap
parser: help: French audience
parser: implement long date
parser: implement optional output as dictionary
parser: only print description when requested
add basic Makefile
implement filtering via simple config file
lexer: remove commented out v1 etiquettes
lexer: switch to 7bit
parser: formatting cleanup, no code change
parser: implement frame skipping
parser: add usage() and option to add \n after fields
parser: implement label unpacking
This exposes the full description as well as label unit as per specification,
at the cost of slightly increased stack usage
parser: prepare implementing label unpacking
No output change for now.
This comes at zero cost over the previous implementation, save for binary size increase.
Further reduce memory pressure by using const char for labels
This essentially halves the number of allocations by only using them for
dynamic data (namely horodate and data).
Valgrind output on 100KB test:
- Before:
see previous commit
- After:
thread 1 finished and used 21967 bytes out of
8388608 on its stack. Margin:
8366641 bytes.
total heap usage: 4,961 allocs, 4,961 frees, 83,025 bytes allocated
parser: don't malloc()
At the cost of a slight stack usage increase, this drastically reduces
overall memory usage and improves performance since we don't incur the
malloc() penalty.
Sample figures from a single run over a 100KB test capture:
- Before:
thread 1 finished and used 17151 bytes out of
8388608 on its stack. Margin:
8371457 bytes.
total heap usage: 13,996 allocs, 13,996 frees, 255,865 bytes allocated
- After:
thread 1 finished and used 21967 bytes out of
8388608 on its stack. Margin:
8366641 bytes.
total heap usage: 9,516 allocs, 9,516 frees, 112,505 bytes allocated
parser: output frames as individual root elements
parser: simplify error recovery
parser: implement masking zero-values
parser: parse hex values (STGE)
parser: process int values as ints
parser: prepare to process int values
don't copy label
add stty.settings
fix error handling/recovery
Improve error reporting too.
Error messages are sent to stderr, so stdout still carries a valid JSON
stream.
initial commit fully working on sample data
tic2json TIC parser/converter
RSS
Atom