Closed Bug 962344 Opened 12 years ago Closed 12 years ago

Log messages in IPDL should contain from/to information; Log message should go to logcat on Gonk devices.

Categories

(Core :: IPC, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
1.4 S1 (14feb)

People

(Reporter: tedders1, Assigned: tedders1)

Details

(Whiteboard: [systemsfe])

Attachments

(5 files, 1 obsolete file)

1) IPDL log messages currently include the current process ID, but it would be useful for them to also include the ID of the process that the IPDL message is going to or coming from. 2) IPDL log messages currently go to stderr, but stderr isn't viewable when debugging Gonk devices. The log messages should go to logcat.
Adding Ben to the CC.
Assignee: nobody → tclancy
Attached patch patch-logging-ipdl.diff (obsolete) — Splinter Review
Attachment #8363330 - Flags: review?(bent.mozilla)
Whiteboard: [systemsfe]
Target Milestone: --- → 1.3 C3/1.4 S3(31jan)
Status: NEW → ASSIGNED
Comment on attachment 8363330 [details] [diff] [review] patch-logging-ipdl.diff Review of attachment 8363330 [details] [diff] [review]: ----------------------------------------------------------------- Hi Ted, would you mind posting a sample of the relevant generated code as well? That makes reviewing much easier. Thanks!
Attached file PBrowser.h
Attached file PBrowserChild.cpp
Attached file PBlobParent.cpp
Attached file ipc_logcat_output.txt
Attachment #8365304 - Attachment mime type: text/x-c++src → text/plain
Attachment #8365305 - Attachment mime type: text/x-c++src → text/plain
Comment on attachment 8363330 [details] [diff] [review] patch-logging-ipdl.diff Review of attachment 8363330 [details] [diff] [review]: ----------------------------------------------------------------- Hey Ted, this looks great! Thanks for working on this. I have a few suggestion: ::: ipc/ipdl/ipdl/lower.py @@ +1860,5 @@ > > logger.addstmt(appendToMsg(ExprLiteral.String('[TODO])\\n'))) > > + logger.addstmts([ > + CppDirective('ifdef', 'MOZ_WIDGET_GONK'), I believe this should be using the |ANDROID| define since this mechanism won't be used only on Gonk. However, I'm not 100% sure that we always define that for B2G. Let's check and get this switched over to |ANDROID| if we can. @@ +1862,5 @@ > > + logger.addstmts([ > + CppDirective('ifdef', 'MOZ_WIDGET_GONK'), > + StmtExpr(ExprCall( > + ExprVar('__android_log_write'), We should make sure that there is a proper include for this function at the top of each PFoo.h file: #ifdef ANDROID #include <android/log.h> #endif @@ +1864,5 @@ > + CppDirective('ifdef', 'MOZ_WIDGET_GONK'), > + StmtExpr(ExprCall( > + ExprVar('__android_log_write'), > + args=[ ExprVar('ANDROID_LOG_INFO'), > + ExprLiteral.String('IPCMessage'), Nit: Let's make this 'GeckoIPC', most other logs we create are called 'Gecko'.
Attachment #8363330 - Flags: review?(bent.mozilla)
Attachment #8363330 - Attachment is obsolete: true
Attachment #8369386 - Flags: review?(bent.mozilla)
Comment on attachment 8369386 [details] [diff] [review] patch-logging-ipdl.diff Review of attachment 8369386 [details] [diff] [review]: ----------------------------------------------------------------- Looks great! Thanks!
Attachment #8369386 - Flags: review?(bent.mozilla) → review+
Great work Ted!
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: 1.3 C3/1.4 S3(31jan) → 1.4 S1 (14feb)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: