summaryrefslogtreecommitdiff
path: root/util/logging.cc
Commit message (Collapse)AuthorAgeFilesLines
* Add some std:: qualifiers to types and functions.Victor Costan2020-04-291-3/+3
| | | | PiperOrigin-RevId: 309110431
* Switch from C headers to C++ headers.Victor Costan2020-04-291-5/+3
| | | | | | | | | | | | | | | This CL makes the following substitutions. * assert.h -> cassert * math.h -> cmath * stdarg.h -> cstdarg * stddef.h -> cstddef * stdint.h -> cstdint * stdio.h -> cstdio * stdlib.h -> cstdlib * string.h -> cstring PiperOrigin-RevId: 309080151
* unsigned char -> uint8_tVictor Costan2019-05-281-6/+5
| | | | PiperOrigin-RevId: 250309603
* Format all files IAW the Google C++ Style Guide.Chris Mumford2019-05-021-3/+4
| | | | | | Use clang-format to correct formatting to be in agreement with the [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html). Doing this simplifies the process of accepting changes. Also fixed a few warnings flagged by clang-tidy. PiperOrigin-RevId: 246350737
* Add forgotten <limits> header to util/logging.cc.costan2018-04-131-0/+1
| | | | | | | | | Commit a0008deb679480fd30e845d7e52421af72160c2c introduced std::numeric_limits usage in logging.cc, but didn't #include <limits> ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=192840190
* Reimplement ConsumeDecimalNumber.costan2018-04-131-19/+29
| | | | | | | | | | | | | | | | The old implementation caused odd crashes on ARM, which were fixed by changing a local variable type. The main suspect is the use of a static local variable. This CL replaces the static local variable with constexpr, which still ensures the compiler sees the expressions as constants. The CL also replaces Slice operations in the functions' inner loop with iterator-style pointer operations, which can help the compiler generate less code. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=192832175
* Switched variable type from int to uint64_t in ConsumeDecimalNumber.cmumford2017-08-241-1/+2
| | | | | | | | | | | | | An Android test was occasionally crashing with a SEGV in ConsumeDecimalNumber Switching a local variable from an int to uint64_t eliminated these crashes. Speculating this is either a compiler, runtime library, or emulator issue. Switching this type to uint64_t also eliminates a compiler warning about comparing an int with a uint64_t. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=166399695
* Release 1.18v1.18Chris Mumford2014-09-161-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes are: * Update version number to 1.18 * Replace the basic fprintf call with a call to fwrite in order to work around the apparent compiler optimization/rewrite failure that we are seeing with the new toolchain/iOS SDKs provided with Xcode6 and iOS8. * Fix ALL the header guards. * Createed a README.md with the LevelDB project description. * A new CONTRIBUTING file. * Don't implicitly convert uint64_t to size_t or int. Either preserve it as uint64_t, or explicitly cast. This fixes MSVC warnings about possible value truncation when compiling this code in Chromium. * Added a DumpFile() library function that encapsulates the guts of the "leveldbutil dump" command. This will allow clients to dump data to their log files instead of stdout. It will also allow clients to supply their own environment. * leveldb: Remove unused function 'ConsumeChar'. * leveldbutil: Remove unused member variables from WriteBatchItemPrinter. * OpenBSD, NetBSD and DragonflyBSD have _LITTLE_ENDIAN, so define PLATFORM_IS_LITTLE_ENDIAN like on FreeBSD. This fixes: * issue #143 * issue #198 * issue #249 * Switch from <cstdatomic> to <atomic>. The former never made it into the standard and doesn't exist in modern gcc versions at all. The later contains everything that leveldb was using from the former. This problem was noticed when porting to Portable Native Client where no memory barrier is defined. The fact that <cstdatomic> is missing normally goes unnoticed since memory barriers are defined for most architectures. * Make Hash() treat its input as unsigned. Before this change LevelDB files from platforms with different signedness of char were not compatible. This change fixes: issue #243 * Verify checksums of index/meta/filter blocks when paranoid_checks set. * Invoke all tools for iOS with xcrun. (This was causing problems with the new XCode 5.1.1 image on pulse.) * include <sys/stat.h> only once, and fix the following linter warning: "Found C system header after C++ system header" * When encountering a corrupted table file, return Status::Corruption instead of Status::InvalidArgument. * Support cygwin as build platform, patch is from https://code.google.com/p/leveldb/issues/detail?id=188 * Fix typo, merge patch from https://code.google.com/p/leveldb/issues/detail?id=159 * Fix typos and comments, and address the following two issues: * issue #166 * issue #241 * Add missing db synchronize after "fillseq" in the benchmark. * Removed unused variable in SeekRandom: value (issue #201)
* A number of fixes:Hans Wennborg2011-10-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Replace raw slice comparison with a call to user comparator. Added test for custom comparators. - Fix end of namespace comments. - Fixed bug in picking inputs for a level-0 compaction. When finding overlapping files, the covered range may expand as files are added to the input set. We now correctly expand the range when this happens instead of continuing to use the old range. For example, suppose L0 contains files with the following ranges: F1: a .. d F2: c .. g F3: f .. j and the initial compaction target is F3. We used to search for range f..j which yielded {F2,F3}. However we now expand the range as soon as another file is added. In this case, when F2 is added, we expand the range to c..j and restart the search. That picks up file F1 as well. This change fixes a bug related to deleted keys showing up incorrectly after a compaction as described in Issue 44. (Sync with upstream @25072954)
* @20776309dgrogan@chromium.org2011-04-201-1/+1
| | | | | | | | | * env_chromium.cc should not export symbols. * Fix MSVC warnings. * Removed large value support. * Fix broken reference to documentation file git-svn-id: https://leveldb.googlecode.com/svn/trunk@24 62dab493-f737-651d-591e-8d6aee1b9529
* reverting disastrous MOE commit, returning to r21dgrogan@chromium.org2011-04-191-0/+81
| | | | git-svn-id: https://leveldb.googlecode.com/svn/trunk@23 62dab493-f737-651d-591e-8d6aee1b9529
* Revision created by MOE tool push_codebase.dgrogan@chromium.org2011-04-191-81/+0
| | | | | | | MOE_MIGRATION= git-svn-id: https://leveldb.googlecode.com/svn/trunk@22 62dab493-f737-651d-591e-8d6aee1b9529
* chmod a-xdgrogan@chromium.org2011-04-181-0/+0
| | | | git-svn-id: https://leveldb.googlecode.com/svn/trunk@21 62dab493-f737-651d-591e-8d6aee1b9529
* @20602303. Default file permission is now 755.dgrogan@chromium.org2011-04-121-0/+0
| | | | git-svn-id: https://leveldb.googlecode.com/svn/trunk@20 62dab493-f737-651d-591e-8d6aee1b9529
* Move include files into a leveldb subdir.jorlow@chromium.org2011-03-301-2/+2
| | | | git-svn-id: https://leveldb.googlecode.com/svn/trunk@18 62dab493-f737-651d-591e-8d6aee1b9529
* Initial checkin.jorlow@chromium.org2011-03-181-0/+81
git-svn-id: https://leveldb.googlecode.com/svn/trunk@2 62dab493-f737-651d-591e-8d6aee1b9529