author David Keeler <>
Thu, 11 May 2017 13:22:52 -0700
changeset 13344 19b8f1384e9802167eea5b7bc3a3d5824406420c
parent 13190 17f4b62249b198bdf4a0122b448fcca5dc657f63
child 13404 3e146010400e6a0a9805589df69f2aac26ce81f2
permissions -rw-r--r--
Bug 1363932 - reduce locking overhead in sftk_searchObjectList r=franziskus Summary: Before this patch, sftk_searchObjectList would acquire and release the SFTKSlot's objectLock once per bucket in the SFTKSlot's sessObjHashTable. This patch reduces the locking overhead by acquiring the lock once and then iterating over the entire table. This patch also removes the unused PRBool tokenOnly in NSC_FindObjectsInit (the only caller of sftk_searchObjectList). (Changeset b8f289456399 removed the code that modified tokenOnly. Unfortunately there doesn't appear to be a bug associated with that changeset, so we can't easily determine if that was intended. In any case, it's been this way for a decade, so if anything was broken by this, no one has noticed yet.) Reviewers: franziskus Reviewed By: franziskus Differential Revision:

Usage: ${0##*/} [-hcv] [-j <n>] [--nspr] [--gyp|-g] [--opt|-o] [-m32]
                [--test] [--pprof] [--scan-build[=output]] [--ct-verif]
                [--asan] [--ubsan] [--msan] [--sancov[=edge|bb|func|...]]
                [--disable-tests] [--fuzz[=tls|oss]] [--system-sqlite]
                [--no-zdefs] [--with-nspr] [--system-nspr]

This script builds NSS with gyp and ninja.

This build system is still under development.  It does not yet support all
the features or platforms that NSS supports.

NSS build tool options:

    -h               display this help and exit
    -c               clean before build
    -v               verbose build
    -j <n>           run at most <n> concurrent jobs
    --nspr           force a rebuild of NSPR
    --gyp|-g         force a rerun of gyp
    --opt|-o         do an opt build
    -m32             do a 32-bit build on a 64-bit system
    --test           ignore map files and export everything we have
    --fuzz           build fuzzing targets (this always enables test builds)
                     --fuzz=tls to enable TLS fuzzing mode
                     --fuzz=oss to build for OSS-Fuzz
    --pprof          build with gperftool support
    --ct-verif       build with valgrind for ct-verif
    --scan-build     run the build with scan-build (scan-build has to be in the path)
                     --scan-build=/out/path sets the output path for scan-build
    --asan           do an asan build
    --ubsan          do an ubsan build
                     --ubsan=bool,shift,... sets specific UB sanitizers
    --msan           do an msan build
    --sancov         do sanitize coverage builds
                     --sancov=func sets coverage to function level for example
    --disable-tests  don't build tests and corresponding cmdline utils
    --system-sqlite  use system sqlite
    --no-zdefs       don't set -Wl,-z,defs
    --with-nspr      don't build NSPR but use the one at the given location, e.g.
    --system-nspr    use system nspr. This requires an installation of NSPR and
                     might not work on all systems.