Skip to content

PCRE v2, PCRE v1 JIT, log -P & fixes

Ævar Arnfjörð Bjarmason git 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest8 patches 13 repliesIn review
  2. v37 patches 0 repliesSuperseded
  3. v2 posting 2/27 patches 12 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v2 posting 1/27 patches4 repliesSuperseded
v17 patches2 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8grep: don't redundantly compile throwaway patterns under threadingbuiltin/grep.c+11 -30 replies
2/8grep: skip pthreads overhead when using one threadbuiltin/grep.c+2 -06 replies
3/8log: add -P as a synonym for --perl-regexpDocumentation/rev-list-options.txt revision.c t/t4202-log.sh+14 -10 replies
4/8grep: add support for the PCRE v1 JIT APIgrep.c grep.h+42 -40 replies
5/8grep: un-break building with PCRE < 8.32grep.c grep.h+8 -30 replies
6/8grep: un-break building with PCRE < 8.20grep.h+3 -00 replies
7/8grep: un-break building with PCRE >= 8.32 without --enable-jitMakefile config.mak.uname grep.h+16 -00 replies
8/8grep: add support for PCRE v2Makefile configure.ac grep.c +2 more+256 -210 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 0/8] PCRE v2, PCRE v1 JIT, log -P & fixes

See <[email protected]> for v3
(https://public-inbox.org/git/[email protected]/).

This is on top of "[PATCH v4 00/31] Easy to review grep & pre-PCRE changes".

Changes:

Ævar Arnfjörð Bjarmason (8):
grep: don't redundantly compile throwaway patterns under threading
grep: skip pthreads overhead when using one thread
log: add -P as a synonym for --perl-regexp
grep: add support for the PCRE v1 JIT API
grep: un-break building with PCRE < 8.32
grep: un-break building with PCRE < 8.20

No changes.

  grep: un-break building with PCRE >= 8.32 without --enable-jit

NEW: It turns out that a PCRE version that supports JIT, but is built without JIT support will fail at link time since there's no pcre_jit_exec symbol.

It also turns out (contrary to what I claimed on list before, my mistake) that there's no way to detect this through some macro. All the pcre include files are the same with/without --enable-jit, only the object file differs.

So there's now a NO_LIBPCRE1_JIT flag to the Makefile, which is off by default, but turned on on MinGW. I have not tested that config.mak.uname change, but everything else I could test on Linux.

The reason for why it's NO_LIBPCRE1_JIT not USE_LIBPCRE1_JIT is that in practice pretty much everyone who builds pcre builds it with JIT (I've looked through various Linux/BSD distro build files), it's MinGW that's the exception here. Given the performance gain it makes sense to make it the default.

grep: add support for PCRE v2

Almost no changes, just:

* A trivial change to stop redundantly assigning to pcre2_jit_on, mistakenly left over from an earlier version.

* Updated commit message / perf numbers for the extra patches in the series both here and in v3.

 Documentation/rev-list-options.txt |   1 +
 Makefile                           |  49 ++++++++--
 builtin/grep.c                     |  16 +++-
 config.mak.uname                   |   1 +
 configure.ac                       |  77 ++++++++++++---
 grep.c                             | 185 ++++++++++++++++++++++++++++++++++++-
 grep.h                             |  33 +++++++
 revision.c                         |   2 +-
 t/t4202-log.sh                     |  12 +++
 t/test-lib.sh                      |   2 +-
 10 files changed, 349 insertions(+), 29 deletions(-)
Signature · 1 line
2.13.0.303.g4ebf302169