ripgrep for set.c usage
This commit is contained in:
@@ -219,3 +219,4 @@ __marimo__/
|
|||||||
|
|
||||||
alt-rpm
|
alt-rpm
|
||||||
set.c
|
set.c
|
||||||
|
rpm-build
|
||||||
|
|||||||
@@ -0,0 +1,80 @@
|
|||||||
|
rg rpmsetcmp:
|
||||||
|
|
||||||
|
```
|
||||||
|
tools/setcmp.c
|
||||||
|
12-{
|
||||||
|
13: int cmp = rpmsetcmp(s1, s2);
|
||||||
|
14- switch (cmp) {
|
||||||
|
|
||||||
|
alt/rpm.spec
|
||||||
|
709-_ Mon Nov 25 2019 Andrew Savchenko <bircoph@altlinux.org> 4.13.0.1-alt15
|
||||||
|
710:- Support rpmsetcmp profiling on E2K.
|
||||||
|
711-
|
||||||
|
--
|
||||||
|
713-- Added triggers circumvention for packagekit offline update (by Aleksei Nikiforov).
|
||||||
|
714:- Imported rpmsetcmp optimization from rpm-build.
|
||||||
|
715-
|
||||||
|
--
|
||||||
|
1094-- set.c: Increased cache size from 160 to 256 slots, 75 percent hit ratio.
|
||||||
|
1095:- set.c: Implemented 4-byte and 8-byte steppers for rpmsetcmp main loop.
|
||||||
|
1096-
|
||||||
|
--
|
||||||
|
1314-_ Mon Sep 20 2010 Alexey Tourbin <at@altlinux.ru> 4.0.4-alt98.47
|
||||||
|
1315:- set.c (rpmsetcmp): Fixed check for set2 decoding error.
|
||||||
|
1316-- brp-cleanup: Updated for /usr/lib64/perl5 and /usr/share/perl5.
|
||||||
|
|
||||||
|
lib/rpmds.c
|
||||||
|
1087- if (aset && bset) {
|
||||||
|
1088: sense = rpmsetcmp(AEVR, BEVR);
|
||||||
|
1089- if (sense < -1) {
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
rg set_new:
|
||||||
|
none
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
rg set_add
|
||||||
|
none
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
rg set_fini:
|
||||||
|
none
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
rg set_free:
|
||||||
|
none
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
rg setcmp:
|
||||||
|
|
||||||
|
```
|
||||||
|
Makefile.am
|
||||||
|
218-
|
||||||
|
219:noinst_PROGRAMS = setcmp
|
||||||
|
220:setcmp_SOURCES = tools/setcmp.c
|
||||||
|
221:setcmp_LDADD = lib/librpm.la
|
||||||
|
222-
|
||||||
|
|
||||||
|
alt/rpm.spec
|
||||||
|
311-rpmquery -a --requires |fgrep '= set:' |sort >R
|
||||||
|
312:join -o 1.3,2.3 P R |shuf >setcmp-data
|
||||||
|
313:time ./setcmp <setcmp-data >/dev/null
|
||||||
|
314-rm lib/set.lo lib/librpm.la
|
||||||
|
--
|
||||||
|
318-%if_with profile
|
||||||
|
319:time ./setcmp <setcmp-data >/dev/null
|
||||||
|
320-rm lib/set.lo lib/librpm.la
|
||||||
|
321-%make_build -C lib set.lo librpm.la CFLAGS="$set_c_cflags -fprofile-generate"
|
||||||
|
322:./setcmp <setcmp-data >/dev/null
|
||||||
|
323-%ifnarch %e2k
|
||||||
|
--
|
||||||
|
332-%make_build
|
||||||
|
333:time ./setcmp <setcmp-data >/dev/null
|
||||||
|
334-
|
||||||
|
```
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
rg rpmsetcmp:
|
||||||
|
|
||||||
|
```
|
||||||
|
tools/setcmp.c
|
||||||
|
12-{
|
||||||
|
13: int cmp = rpmsetcmp(s1, s2);
|
||||||
|
14- switch (cmp) {
|
||||||
|
|
||||||
|
lib/depends.c
|
||||||
|
124- if (aset && bset) {
|
||||||
|
125: sense = rpmsetcmp(AEVR, BEVR);
|
||||||
|
126- if (sense < -1) {
|
||||||
|
|
||||||
|
rpm-4_0.spec
|
||||||
|
1231-- set.c: Increased cache size from 160 to 256 slots, 75 percent hit ratio.
|
||||||
|
1232:- set.c: Implemented 4-byte and 8-byte steppers for rpmsetcmp main loop.
|
||||||
|
1233-
|
||||||
|
--
|
||||||
|
1451-* Mon Sep 20 2010 Alexey Tourbin <at@altlinux.ru> 4.0.4-alt98.47
|
||||||
|
1452:- set.c (rpmsetcmp): Fixed check for set2 decoding error.
|
||||||
|
1453-- brp-cleanup: Updated for /usr/lib64/perl5 and /usr/share/perl5.
|
||||||
|
|
||||||
|
build/reqprov.c
|
||||||
|
175- if (aset && bset) {
|
||||||
|
176: sense = rpmsetcmp(Aevr, Bevr);
|
||||||
|
177- if (sense < -1)
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
rg set_new:
|
||||||
|
|
||||||
|
```
|
||||||
|
tools/mkset.c
|
||||||
|
11- assert(bpp <= 32);
|
||||||
|
12: struct set *set = set_new();
|
||||||
|
13- char *line = NULL;
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
rg set_add:
|
||||||
|
|
||||||
|
```
|
||||||
|
tools/mkset.c
|
||||||
|
21- continue;
|
||||||
|
22: set_add(set, line);
|
||||||
|
23- added++;
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
rg set_fini:
|
||||||
|
|
||||||
|
```
|
||||||
|
tools/mkset.c
|
||||||
|
25- assert(added > 0);
|
||||||
|
26: const char *str = set_fini(set, bpp);
|
||||||
|
27- assert(str);
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
rg set_free:
|
||||||
|
none
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
rg mkset:
|
||||||
|
|
||||||
|
```
|
||||||
|
rpm-4_0.spec
|
||||||
|
431-# set-version helpers
|
||||||
|
432:%rpmattr %_rpmlibdir/mkset
|
||||||
|
433-%rpmattr %_rpmlibdir/setcmp
|
||||||
|
--
|
||||||
|
1458-- rpmlibprov.c: Added rpmlib(SetVersions) feature.
|
||||||
|
1459:- %_rpmlibdir/mkset: Command-line helper for making set-versions.
|
||||||
|
1460-- lib.prov: Implemented soname set-versioning with exported symbols.
|
||||||
|
|
||||||
|
tools/Makefile.am
|
||||||
|
37- relative \
|
||||||
|
38: mkset \
|
||||||
|
39- setcmp \
|
||||||
|
--
|
||||||
|
62-
|
||||||
|
63:mkset_SOURCES = mkset.c
|
||||||
|
64-setcmp_SOURCES = setcmp.c
|
||||||
|
|
||||||
|
autodeps/lib.prov.in
|
||||||
|
112- Info "$f: $n symbols, $bpp bpp"
|
||||||
|
113: set=$(printf '%s\n' "$sym" |"${RPMB_TOOLS_DIR-@RPMCONFIGDIR@}/mkset" "$bpp")
|
||||||
|
114- printf '%s = %s\n' "$provname" "$set"
|
||||||
|
|
||||||
|
autodeps/lib.req.in
|
||||||
|
306- #printf '%s\n' "$reqsym" |LC_ALL=C sort -c -u
|
||||||
|
307: set=$(printf '%s\n' "$reqsym" |"${RPMB_TOOLS_DIR-@RPMCONFIGDIR@}/mkset" "$bpp")
|
||||||
|
308- printf '%s >= %s\n' "$dep" "$set"
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user