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:
Nicholas Nethercote 2016-03-04 17:02:20 +11:00
Родитель 09bd32b41a
Коммит ebc23cf4dc
2 изменённых файлов: 3 добавлений и 19 удалений

Просмотреть файл

@ -382,7 +382,6 @@ class Options
Mode mMode;
NumOption<size_t> mSampleBelowSize;
NumOption<uint32_t> mMaxFrames;
bool mShowDumpStats;
void BadArg(const char* aArg);
@ -404,7 +403,6 @@ public:
const char* DMDEnvVar() const { return mDMDEnvVar; }
size_t SampleBelowSize() const { return mSampleBelowSize.mActual; }
size_t MaxFrames() const { return mMaxFrames.mActual; }
size_t ShowDumpStats() const { return mShowDumpStats; }
};
@ -695,9 +693,7 @@ public:
private:
uint32_t mLength; // The number of PCs.
const void* mPcs[MaxFrames]; // The PCs themselves. If --max-frames is less
// than 24, this array is bigger than
// necessary, but that case is unusual.
const void* mPcs[MaxFrames]; // The PCs themselves.
public:
StackTrace() : mLength(0) {}
@ -779,7 +775,7 @@ StackTrace::Get(Thread* aT)
AutoUnlockState unlock;
uint32_t skipFrames = 2;
if (MozStackWalk(StackWalkCallback, skipFrames,
gOptions->MaxFrames(), &tmp, 0, nullptr)) {
MaxFrames, &tmp, 0, nullptr)) {
// Handle the common case first. All is ok. Nothing to do.
} else {
tmp.mLength = 0;
@ -1430,7 +1426,6 @@ Options::Options(const char* aDMDEnvVar)
: nullptr)
, mMode(DarkMatter)
, mSampleBelowSize(4093, 100 * 100 * 1000)
, mMaxFrames(StackTrace::MaxFrames, StackTrace::MaxFrames)
, mShowDumpStats(false)
{
// 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)) {
mSampleBelowSize.mActual = myLong;
} else if (GetLong(arg, "--max-frames", 1, mMaxFrames.mMax, &myLong)) {
mMaxFrames.mActual = myLong;
} else if (GetBool(arg, "--show-dump-stats", &myBool)) {
mShowDumpStats = myBool;
@ -1513,9 +1505,6 @@ Options::BadArg(const char* aArg)
int(mSampleBelowSize.mMax),
int(mSampleBelowSize.mDefault));
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("\n");
exit(1);

Просмотреть файл

@ -1118,13 +1118,10 @@ class RunProgram(MachCommandBase):
help='Profiling mode. The default is \'dark-matter\'.')
@CommandArgument('--sample-below', default=None, type=str, group='DMD',
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',
help='Show stats when doing dumps.')
def run(self, params, remote, background, noprofile, debug, debugger,
debugparams, slowscript, dmd, mode, sample_below, max_frames,
show_dump_stats):
debugparams, slowscript, dmd, mode, sample_below, show_dump_stats):
if conditions.is_android(self):
# Running Firefox for Android is completely different
@ -1207,8 +1204,6 @@ class RunProgram(MachCommandBase):
dmd_params.append('--mode=' + mode)
if sample_below:
dmd_params.append('--sample-below=' + sample_below)
if max_frames:
dmd_params.append('--max-frames=' + max_frames)
if show_dump_stats:
dmd_params.append('--show-dump-stats=yes')