Closed Bug 1231802 Opened 9 years ago Closed 2 years ago

Build an event recorder into Gecko

Categories

(Core :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: wcpan, Unassigned)

Details

Attachments

(4 files, 9 obsolete files)

7.73 KB, patch
Details | Diff | Splinter Review
2.82 KB, patch
Details | Diff | Splinter Review
2.33 KB, patch
Details | Diff | Splinter Review
38.74 KB, patch
Details | Diff | Splinter Review
Sometimes it's hard to reproduce a problem that detected in monkey/fuzz testing.
It may require a very specific timing or gesture, so one maybe need to retry many times to reproduce the problem.
This also makes it hard to report or share the problem to other people, because sometimes a stack trace is not enough.

If we have a mechanism to let developers simply replay what the specific execution do, then it will be easier to debug.
Assignee: nobody → wpan
TODO:
1. remove external JSON code
2. record event timing
3. record message
4. find out which API need to be mocked
Comment on attachment 8697377 [details] [diff] [review]
build-an-event-recorder-into-gecko-WIP.patch

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

Just a question!

::: dom/events/_jsonc/json.h
@@ +7,5 @@
> + *
> + * This library is free software; you can redistribute it and/or modify
> + * it under the terms of the MIT license. See COPYING for details.
> + *
> + */

Is there any reason that you don't use json parser and generator already in our code base?
(In reply to Thinker Li [:sinker] from comment #3)
> Comment on attachment 8697377 [details] [diff] [review]
> 
> Is there any reason that you don't use json parser and generator already in
> our code base?

As far as I know, the only JSON parser in the code base is JSONParser, which
needs a JSContext. When I ported it to B2G it always crashes while starting
b2g, so I temporary replaced that part to an external library.

It should use pickling traits in IPCMessageUtils.h for a more compact serialization.
mfbt/JSONWriter.h is a JSON pretty-printer that's designed to minimize the amount of memory used while printing.
Added a devtools actor (still WIP): eventPlayerActor.

The actor supports 3 commands: start, stop, play.

command example:

{
  "to": "server2.conn0.child1/eventPlayerActor26",
  "type": "start"
}

{
  "to": "server2.conn0.child1/eventPlayerActor26",
  "type": "stop"
}

{
  "to": "server2.conn0.child1/eventPlayerActor26",
  "type": "play",
  "events": {}
}
Removed external JSON library.
Attachment #8713051 - Attachment is obsolete: true
Attachment #8713052 - Attachment is obsolete: true
Attachment #8713053 - Attachment is obsolete: true
this patch is optional.
Add some mouse events.
Reduce event replay speed.
Attachment #8713582 - Attachment is obsolete: true
Attachment #8713583 - Attachment is obsolete: true
Attachment #8713584 - Attachment is obsolete: true
Attachment #8713585 - Attachment is obsolete: true
add some common events
Attachment #8714709 - Attachment is obsolete: true

The bug assignee didn't login in Bugzilla in the last 7 months, so the assignee is being reset.

Assignee: legnaleurc → nobody

rr sort of works for these things, assuming you are okay with being Linux-only. There's also WebReplay as mentioned. I think we can close this for now, as it seems to be some experiment that didn't pan out.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: