summaryrefslogtreecommitdiffstats
path: root/mozglue
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--mozglue/baseprofiler/public/BaseProfilerState.h5
-rw-r--r--mozglue/linker/ElfLoader.h1
-rw-r--r--mozglue/misc/TimeStamp.h2
-rw-r--r--mozglue/misc/decimal/Decimal.cpp10
-rw-r--r--mozglue/misc/decimal/Decimal.h6
5 files changed, 9 insertions, 15 deletions
diff --git a/mozglue/baseprofiler/public/BaseProfilerState.h b/mozglue/baseprofiler/public/BaseProfilerState.h
index f9df8d2975..32d99cc238 100644
--- a/mozglue/baseprofiler/public/BaseProfilerState.h
+++ b/mozglue/baseprofiler/public/BaseProfilerState.h
@@ -238,7 +238,10 @@ class MOZ_RAII AutoProfilerStats {
"every CPU core for every profiler sample.") \
\
MACRO(23, "bandwidth", Bandwidth, \
- "Record the network bandwidth used for every profiler sample.")
+ "Record the network bandwidth used for every profiler sample.") \
+ MACRO(24, "memory", Memory, \
+ "Track the memory allocations and deallocations per process over " \
+ "time.")
// *** Synchronize with lists in ProfilerState.h and geckoProfiler.json ***
struct ProfilerFeature {
diff --git a/mozglue/linker/ElfLoader.h b/mozglue/linker/ElfLoader.h
index cadf7287fb..a57431f830 100644
--- a/mozglue/linker/ElfLoader.h
+++ b/mozglue/linker/ElfLoader.h
@@ -47,7 +47,6 @@ int __wrap_dl_iterate_phdr(dl_phdr_cb callback, void* data);
#ifdef __ARM_EABI__
const void* __wrap___gnu_Unwind_Find_exidx(void* pc, int* pcount);
#endif
-
}
/* Forward declarations for use in LibHandle */
diff --git a/mozglue/misc/TimeStamp.h b/mozglue/misc/TimeStamp.h
index b38882b250..635b62cf13 100644
--- a/mozglue/misc/TimeStamp.h
+++ b/mozglue/misc/TimeStamp.h
@@ -469,7 +469,7 @@ class TimeStamp {
static MFBT_API void RecordProcessRestart();
#ifdef XP_LINUX
- uint64_t RawClockMonotonicNanosecondsSinceBoot() {
+ uint64_t RawClockMonotonicNanosecondsSinceBoot() const {
return static_cast<uint64_t>(mValue);
}
#endif
diff --git a/mozglue/misc/decimal/Decimal.cpp b/mozglue/misc/decimal/Decimal.cpp
index 7d2bcfa712..e4db6a0f1e 100644
--- a/mozglue/misc/decimal/Decimal.cpp
+++ b/mozglue/misc/decimal/Decimal.cpp
@@ -239,11 +239,6 @@ Decimal::Decimal(int32_t i32)
Decimal::Decimal(Sign sign, int exponent, uint64_t coefficient)
: m_data(sign, coefficient ? exponent : 0, coefficient) {}
-Decimal::Decimal(const EncodedData& data)
- : m_data(data)
-{
-}
-
Decimal::Decimal(const Decimal& other)
: m_data(other.m_data)
{
@@ -853,11 +848,6 @@ Decimal Decimal::infinity(const Sign sign)
return Decimal(EncodedData(sign, EncodedData::ClassInfinity));
}
-Decimal Decimal::nan()
-{
- return Decimal(EncodedData(Positive, EncodedData::ClassNaN));
-}
-
Decimal Decimal::remainder(const Decimal& rhs) const
{
const Decimal quotient = *this / rhs;
diff --git a/mozglue/misc/decimal/Decimal.h b/mozglue/misc/decimal/Decimal.h
index 4bb9a841e5..8d9adbff4f 100644
--- a/mozglue/misc/decimal/Decimal.h
+++ b/mozglue/misc/decimal/Decimal.h
@@ -234,11 +234,13 @@ public:
// Note: fromString doesn't support "infinity" and "nan".
static MFBT_API Decimal fromString(const std::string& aValue);
static MFBT_API Decimal infinity(Sign);
- static MFBT_API Decimal nan();
+ static constexpr Decimal nan() {
+ return Decimal(EncodedData(Positive, EncodedData::ClassNaN));
+ }
static MFBT_API Decimal zero(Sign);
// You should not use below methods. We expose them for unit testing.
- MFBT_API explicit Decimal(const EncodedData&);
+ constexpr explicit Decimal(const EncodedData& data) : m_data(data) {}
const EncodedData& value() const { return m_data; }
private: