OLD | NEW |
1 #!/bin/sh | 1 #!/bin/sh |
2 | 2 |
3 # Copyright (c) 2008, Google Inc. | 3 # Copyright (c) 2008, Google Inc. |
4 # All rights reserved. | 4 # All rights reserved. |
5 # | 5 # |
6 # Redistribution and use in source and binary forms, with or without | 6 # Redistribution and use in source and binary forms, with or without |
7 # modification, are permitted provided that the following conditions are | 7 # modification, are permitted provided that the following conditions are |
8 # met: | 8 # met: |
9 # | 9 # |
10 # * Redistributions of source code must retain the above copyright | 10 # * Redistributions of source code must retain the above copyright |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 mkdir "$OUTDIR" || die "Unable to create $OUTDIR" | 74 mkdir "$OUTDIR" || die "Unable to create $OUTDIR" |
75 | 75 |
76 # This puts the output into out.heap and out.growth. It allocates | 76 # This puts the output into out.heap and out.growth. It allocates |
77 # 8*10^7 bytes of memory, which is 76M. Because we sample, the | 77 # 8*10^7 bytes of memory, which is 76M. Because we sample, the |
78 # estimate may be a bit high or a bit low: we accept anything from | 78 # estimate may be a bit high or a bit low: we accept anything from |
79 # 50M to 99M. | 79 # 50M to 99M. |
80 "$SAMPLING_TEST" "$OUTDIR/out" | 80 "$SAMPLING_TEST" "$OUTDIR/out" |
81 | 81 |
82 echo "Testing heap output..." | 82 echo "Testing heap output..." |
83 "$PPROF" --text "$SAMPLING_TEST_BINARY" "$OUTDIR/out.heap" \ | 83 "$PPROF" --text "$SAMPLING_TEST_BINARY" "$OUTDIR/out.heap" \ |
84 | grep '^ *[5-9][0-9]\.[0-9][ 0-9.%]*_*AllocateAllocate' >/dev/null \ | 84 | grep '[5-9][0-9]\.[0-9][ 0-9.%]*_*AllocateAllocate' >/dev/null \ |
85 || die "$PPROF" --text "$SAMPLING_TEST_BINARY" "$OUTDIR/out.heap" | 85 || die "$PPROF" --text "$SAMPLING_TEST_BINARY" "$OUTDIR/out.heap" |
86 echo "OK" | 86 echo "OK" |
87 | 87 |
88 echo "Testing growth output..." | 88 echo "Testing growth output..." |
89 "$PPROF" --text "$SAMPLING_TEST_BINARY" "$OUTDIR/out.growth" \ | 89 "$PPROF" --text "$SAMPLING_TEST_BINARY" "$OUTDIR/out.growth" \ |
90 | grep '^ *[5-9][0-9]\.[0-9][ 0-9.%]*_*AllocateAllocate' >/dev/null \ | 90 | grep '[5-9][0-9]\.[0-9][ 0-9.%]*_*AllocateAllocate' >/dev/null \ |
91 || die "$PPROF" --text "$SAMPLING_TEST_BINARY" "$OUTDIR/out.growth" | 91 || die "$PPROF" --text "$SAMPLING_TEST_BINARY" "$OUTDIR/out.growth" |
92 echo "OK" | 92 echo "OK" |
93 | 93 |
94 echo "PASS" | 94 echo "PASS" |
OLD | NEW |