Bug 1387940 - Make --max-frames=8 the default for dmd.py. r=mccr8.

The current default is 24, which is equal to the maximum number of stack frames
that DMD will record. And that's a terrible value because it splits up too many
related stack traces into separate records. There is no single best value, but
8 is a much better default.

--HG--
extra : rebase_source : c423fc4fe0e490ff6d58fa8f7116bc01c86a366e
This commit is contained in:
Nicholas Nethercote 2017-08-07 14:56:15 +10:00
parent a51f7dc64c
commit 710682624c
4 changed files with 4 additions and 4 deletions

View File

@ -88,7 +88,7 @@ parser.add_argument('-sfl', '--max-stack-frame-length', type=int,
parser.add_argument('-a', '--ignore-alloc-fns', action='store_true',
help='ignore allocation functions at the start of traces')
parser.add_argument('-f', '--max-frames', type=range_1_24,
parser.add_argument('-f', '--max-frames', type=range_1_24, default=8,
help='maximum number of frames to consider in each trace')
parser.add_argument('-c', '--chain-reports', action='store_true',

View File

@ -166,7 +166,7 @@ variable is used to find breakpad symbols for stack fixing.
p.add_argument('-o', '--output', type=argparse.FileType('w'),
help='output file; stdout if unspecified')
p.add_argument('-f', '--max-frames', type=range_1_24,
p.add_argument('-f', '--max-frames', type=range_1_24, default=8,
help='maximum number of frames to consider in each trace')
p.add_argument('-s', '--sort-by', choices=sortByChoices.keys(),

View File

@ -1,5 +1,5 @@
#-----------------------------------------------------------------
# dmd.py --filter-stacks-for-testing -o script-max-frames-8-actual.txt --max-frames=8 script-max-frames.json
# dmd.py --filter-stacks-for-testing -o script-max-frames-8-actual.txt script-max-frames.json
Invocation {
$DMD = '--mode=live --stacks=full'

View File

@ -187,7 +187,7 @@ function run_test() {
// of the tested values.
jsonFile = FileUtils.getFile("CurWorkD", ["script-max-frames.json"]);
test("script-max-frames-8",
["--max-frames=8", jsonFile.path]);
[jsonFile.path]); // --max-frames=8 is the default
test("script-max-frames-3",
["--max-frames=3", "--no-fix-stacks", jsonFile.path]);
test("script-max-frames-1",