зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1253526 (part 1) - Remove DMD's --max-frames option. r=erahm.
Nobody uses it. --HG-- extra : rebase_source : 6fe2af5f2b7ec19fad8f8cd49871a63599d7ebba
This commit is contained in:
Родитель
09bd32b41a
Коммит
ebc23cf4dc
|
@ -382,7 +382,6 @@ class Options
|
||||||
|
|
||||||
Mode mMode;
|
Mode mMode;
|
||||||
NumOption<size_t> mSampleBelowSize;
|
NumOption<size_t> mSampleBelowSize;
|
||||||
NumOption<uint32_t> mMaxFrames;
|
|
||||||
bool mShowDumpStats;
|
bool mShowDumpStats;
|
||||||
|
|
||||||
void BadArg(const char* aArg);
|
void BadArg(const char* aArg);
|
||||||
|
@ -404,7 +403,6 @@ public:
|
||||||
const char* DMDEnvVar() const { return mDMDEnvVar; }
|
const char* DMDEnvVar() const { return mDMDEnvVar; }
|
||||||
|
|
||||||
size_t SampleBelowSize() const { return mSampleBelowSize.mActual; }
|
size_t SampleBelowSize() const { return mSampleBelowSize.mActual; }
|
||||||
size_t MaxFrames() const { return mMaxFrames.mActual; }
|
|
||||||
size_t ShowDumpStats() const { return mShowDumpStats; }
|
size_t ShowDumpStats() const { return mShowDumpStats; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -695,9 +693,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uint32_t mLength; // The number of PCs.
|
uint32_t mLength; // The number of PCs.
|
||||||
const void* mPcs[MaxFrames]; // The PCs themselves. If --max-frames is less
|
const void* mPcs[MaxFrames]; // The PCs themselves.
|
||||||
// than 24, this array is bigger than
|
|
||||||
// necessary, but that case is unusual.
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
StackTrace() : mLength(0) {}
|
StackTrace() : mLength(0) {}
|
||||||
|
@ -779,7 +775,7 @@ StackTrace::Get(Thread* aT)
|
||||||
AutoUnlockState unlock;
|
AutoUnlockState unlock;
|
||||||
uint32_t skipFrames = 2;
|
uint32_t skipFrames = 2;
|
||||||
if (MozStackWalk(StackWalkCallback, skipFrames,
|
if (MozStackWalk(StackWalkCallback, skipFrames,
|
||||||
gOptions->MaxFrames(), &tmp, 0, nullptr)) {
|
MaxFrames, &tmp, 0, nullptr)) {
|
||||||
// Handle the common case first. All is ok. Nothing to do.
|
// Handle the common case first. All is ok. Nothing to do.
|
||||||
} else {
|
} else {
|
||||||
tmp.mLength = 0;
|
tmp.mLength = 0;
|
||||||
|
@ -1430,7 +1426,6 @@ Options::Options(const char* aDMDEnvVar)
|
||||||
: nullptr)
|
: nullptr)
|
||||||
, mMode(DarkMatter)
|
, mMode(DarkMatter)
|
||||||
, mSampleBelowSize(4093, 100 * 100 * 1000)
|
, mSampleBelowSize(4093, 100 * 100 * 1000)
|
||||||
, mMaxFrames(StackTrace::MaxFrames, StackTrace::MaxFrames)
|
|
||||||
, mShowDumpStats(false)
|
, mShowDumpStats(false)
|
||||||
{
|
{
|
||||||
// It's no longer necessary to set the DMD env var to "1" if you want default
|
// It's no longer necessary to set the DMD env var to "1" if you want default
|
||||||
|
@ -1473,9 +1468,6 @@ Options::Options(const char* aDMDEnvVar)
|
||||||
&myLong)) {
|
&myLong)) {
|
||||||
mSampleBelowSize.mActual = myLong;
|
mSampleBelowSize.mActual = myLong;
|
||||||
|
|
||||||
} else if (GetLong(arg, "--max-frames", 1, mMaxFrames.mMax, &myLong)) {
|
|
||||||
mMaxFrames.mActual = myLong;
|
|
||||||
|
|
||||||
} else if (GetBool(arg, "--show-dump-stats", &myBool)) {
|
} else if (GetBool(arg, "--show-dump-stats", &myBool)) {
|
||||||
mShowDumpStats = myBool;
|
mShowDumpStats = myBool;
|
||||||
|
|
||||||
|
@ -1513,9 +1505,6 @@ Options::BadArg(const char* aArg)
|
||||||
int(mSampleBelowSize.mMax),
|
int(mSampleBelowSize.mMax),
|
||||||
int(mSampleBelowSize.mDefault));
|
int(mSampleBelowSize.mDefault));
|
||||||
StatusMsg(" (prime numbers are recommended)\n");
|
StatusMsg(" (prime numbers are recommended)\n");
|
||||||
StatusMsg(" --max-frames=<1..%d> Max. depth of stack traces [%d]\n",
|
|
||||||
int(mMaxFrames.mMax),
|
|
||||||
int(mMaxFrames.mDefault));
|
|
||||||
StatusMsg(" --show-dump-stats=<yes|no> Show stats about dumps? [no]\n");
|
StatusMsg(" --show-dump-stats=<yes|no> Show stats about dumps? [no]\n");
|
||||||
StatusMsg("\n");
|
StatusMsg("\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
|
@ -1118,13 +1118,10 @@ class RunProgram(MachCommandBase):
|
||||||
help='Profiling mode. The default is \'dark-matter\'.')
|
help='Profiling mode. The default is \'dark-matter\'.')
|
||||||
@CommandArgument('--sample-below', default=None, type=str, group='DMD',
|
@CommandArgument('--sample-below', default=None, type=str, group='DMD',
|
||||||
help='Sample blocks smaller than this. Use 1 for no sampling. The default is 4093.')
|
help='Sample blocks smaller than this. Use 1 for no sampling. The default is 4093.')
|
||||||
@CommandArgument('--max-frames', default=None, type=str, group='DMD',
|
|
||||||
help='The maximum depth of stack traces. The default and maximum is 24.')
|
|
||||||
@CommandArgument('--show-dump-stats', action='store_true', group='DMD',
|
@CommandArgument('--show-dump-stats', action='store_true', group='DMD',
|
||||||
help='Show stats when doing dumps.')
|
help='Show stats when doing dumps.')
|
||||||
def run(self, params, remote, background, noprofile, debug, debugger,
|
def run(self, params, remote, background, noprofile, debug, debugger,
|
||||||
debugparams, slowscript, dmd, mode, sample_below, max_frames,
|
debugparams, slowscript, dmd, mode, sample_below, show_dump_stats):
|
||||||
show_dump_stats):
|
|
||||||
|
|
||||||
if conditions.is_android(self):
|
if conditions.is_android(self):
|
||||||
# Running Firefox for Android is completely different
|
# Running Firefox for Android is completely different
|
||||||
|
@ -1207,8 +1204,6 @@ class RunProgram(MachCommandBase):
|
||||||
dmd_params.append('--mode=' + mode)
|
dmd_params.append('--mode=' + mode)
|
||||||
if sample_below:
|
if sample_below:
|
||||||
dmd_params.append('--sample-below=' + sample_below)
|
dmd_params.append('--sample-below=' + sample_below)
|
||||||
if max_frames:
|
|
||||||
dmd_params.append('--max-frames=' + max_frames)
|
|
||||||
if show_dump_stats:
|
if show_dump_stats:
|
||||||
dmd_params.append('--show-dump-stats=yes')
|
dmd_params.append('--show-dump-stats=yes')
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче