Closed Bug 935840 Opened 11 years ago Closed 11 years ago

Add b2g script moz2d-record.sh

Categories

(Core :: Graphics, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla28

People

(Reporter: BenWa, Assigned: BenWa)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch patch (obsolete) — Splinter Review
Bug 935701 added the ability to record moz2d drawing commands. This script makes it easy to record and capture profiles.
Attachment #828447 - Flags: review?(jld)
Attachment #828447 - Attachment is patch: true
Comment on attachment 828447 [details] [diff] [review]
patch

Review of attachment 828447 [details] [diff] [review]:
-----------------------------------------------------------------

::: moz2d-record.sh
@@ +5,5 @@
> +SCRIPT_NAME=$(basename $0)
> +
> +ADB=adb
> +PROFILE_DIR=/data/local/tmp
> +PROFILE_PATTERN=${PROFILE_DIR}/'profile_?_*.txt';

These two assignments seem to be unused?

@@ +18,5 @@
> +HELP_start="Restart b2g with moz2d draw call recording."
> +cmd_start() {
> +  echo "Stopping b2g"
> +  $ADB shell stop b2g
> +  $ADB shell rm /data/local/tmp/moz2drec_*

Nit: The * should be quoted. It probably won't make a difference in practice given how bash handles globs, but “explicit is better than implicit”.

@@ +30,5 @@
> +cmd_stop() {
> +  echo "Stopping b2g"
> +  $ADB shell stop b2g
> +  echo "Pulling recording(s)"
> +  $ADB shell ls /data/local/tmp/moz2drec_* | tr '\r' ' ' | xargs -n1 $ADB pull

As above for the *.  Also, an even smaller nit: could that be `tr -d '\r'`?

@@ +38,5 @@
> +}
> +
> +HELP_clean="Clean the moz2drec files."
> +cmd_clean() {
> +  rm moz2drec_*.aer

This is `moz2drec_*.aer`, but the other globs are just `moz2drec_*`.  Is that a problem?
Attachment #828447 - Flags: review?(jld) → review+
Attached patch patch + nitsSplinter Review
Assignee: nobody → bgirard
Attachment #828447 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #828669 - Flags: review+
https://github.com/mozilla-b2g/B2G/pull/295
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: