Closed
Bug 557706
Opened 16 years ago
Closed 15 years ago
Allow LogControl printf method to be overridden
Categories
(Tamarin Graveyard :: Baseline JIT (CodegenLIR), defect, P3)
Tamarin Graveyard
Baseline JIT (CodegenLIR)
Tracking
(Not tracked)
RESOLVED
FIXED
Q3 11 - Serrano
People
(Reporter: rreitmai, Assigned: rreitmai)
Details
(Whiteboard: fixed-in-nanojit, fixed-in-tamarin, fixed-in-tracemonkey)
Attachments
(2 files, 1 obsolete file)
|
599 bytes,
patch
|
edwsmith
:
review+
n.nethercote
:
review+
|
Details | Diff | Splinter Review |
|
3.60 KB,
patch
|
edwsmith
:
review+
|
Details | Diff | Splinter Review |
if LogControl.printf is made a virtual method then consumers of nanojit can more easily control how the output is managed.
| Assignee | ||
Comment 1•16 years ago
|
||
Attachment #437481 -
Flags: review?(nnethercote)
Comment 2•16 years ago
|
||
Comment on attachment 437481 [details] [diff] [review]
ver1
"ver1"? Are you planning further versions of this patch? :P
I assume you're planning to subclass this within TM? Seems fine.
Attachment #437481 -
Flags: review?(nnethercote) → review+
| Assignee | ||
Comment 3•16 years ago
|
||
(In reply to comment #2)
> (From update of attachment 437481 [details] [diff] [review])
> Are you planning further versions of this patch? :P
Certainly hope not, but it pays to be ready.
> I assume you're planning to subclass this within TM? Seems fine.
Yes, exactly. It will allow us to redirect the output more easily.
Assignee: nobody → rreitmai
Flags: flashplayer-qrb+
Priority: -- → P3
Target Milestone: --- → flash10.2
| Assignee | ||
Comment 4•16 years ago
|
||
Whiteboard: fixed-in-nanojit
Comment 5•16 years ago
|
||
This breaks tamarin-redux, because in release builds, NJ_VERBOSE is not enabled, and so there is a link error due to the missing vtable for LogControl.
If we only need build-time variation of how LogControl::printf() is implemented, then it should be good enough to move the code from LIR.cpp to avmplus.h, or somewhere in TM, and provide an alternate implementation in CodegenLIR.cpp, like we do in several other cases.
If we actually need *runtime* polymorphism, then we need the virtual method, and the code needs to be rearranged so we never reference class LogControl at all when NJ_VERBOSE is defined, or to ensure a stubbed out printf() method is provided.
If you can fix this soon, I can hold off importing from nanojit-central. Otherwise we should revert the one-line change.
| Assignee | ||
Comment 6•16 years ago
|
||
(In reply to comment #5)
> If you can fix this soon, I can hold off importing from nanojit-central.
> Otherwise we should revert the one-line change.
Fixing, should have a patch by later today.
| Assignee | ||
Comment 7•16 years ago
|
||
Attachment #437481 -
Attachment is obsolete: true
Attachment #437977 -
Flags: review?(edwsmith)
| Assignee | ||
Updated•16 years ago
|
Attachment #437977 -
Flags: review?(nnethercote)
| Assignee | ||
Comment 8•16 years ago
|
||
Attachment #437978 -
Flags: review?(edwsmith)
| Assignee | ||
Updated•16 years ago
|
Attachment #437978 -
Attachment is patch: true
Attachment #437978 -
Attachment mime type: application/octet-stream → text/plain
| Assignee | ||
Comment 9•16 years ago
|
||
Even after these changes we still have a problem with output in tamarin release debugger builds since NJ_VERBOSE is set to 0 in avmshell-features.h
Comment 10•16 years ago
|
||
Comment on attachment 437977 [details] [diff] [review]
ver 2 - seems we did need this after all.
Works for TM, though I'm not sure why the destructor is needed.
Attachment #437977 -
Flags: review?(nnethercote) → review+
| Assignee | ||
Comment 11•16 years ago
|
||
dtor is probably technically not needed unless you derive from LogControl, so for TM its fine, but TR will be using 'class AvmLogControl : public LogControl'
Comment 12•16 years ago
|
||
(In reply to comment #9)
> Even after these changes we still have a problem with output in tamarin release
> debugger builds since NJ_VERBOSE is set to 0 in avmshell-features.h
That's a separate problem. NJ_VERBOSE could/should be getting enabled whenever AVMPLUS_VERBOSE is enabled; this stopped working at some point and I think Steven has some rationale for it.
| Assignee | ||
Comment 13•16 years ago
|
||
(In reply to comment #12)
> (In reply to comment #9)
> > Even after these changes we still have a problem with output in tamarin release
> > debugger builds since NJ_VERBOSE is set to 0 in avmshell-features.h
>
> That's a separate problem. NJ_VERBOSE could/should be getting enabled whenever
> AVMPLUS_VERBOSE is enabled; this stopped working at some point and I think
> Steven has some rationale for it.
Yes separate issue but wanted to surface it since I'm also in talks with Steven regarding it.
Updated•16 years ago
|
Attachment #437977 -
Flags: review?(edwsmith) → review+
Comment 14•16 years ago
|
||
Comment on attachment 437978 [details] [diff] [review]
tamarin patch that uses core->console for output
conditional R+
must fix:
- use VMPI_vsnprintf instead of vsprintf
please fix:
- the 4K buffer doesn't need to be a member of AvmLogControl since its only a temp buffer for printf() to use. stack allocation would be better. If the output lines get clipped anyway, a lower clip limit is probably fine.
- fix indentation of coment after AvmLogControl decl in CodeMgr.h
Also, i noticed that CodegenLIR.log is only used in two places, could replace &log with &pool->codeMgr->log, and remove the AvmLogControl declaration in CodeMgr.
Attachment #437978 -
Flags: review?(edwsmith) → review+
| Assignee | ||
Comment 15•16 years ago
|
||
tamarin changes
- 4K buffer reduced to 1K , now stack allocated in printf()
- VMPI_vsnprintf() used
- whitespace cleanup
- extraneous LogControl removed from CodegenLIR object
pushed http://asteam/hg/tamarin-redux/rev/c31cc23c4a8a
nanojit :
http://hg.mozilla.org/projects/nanojit-central/rev/147e02ce8790
Status: NEW → ASSIGNED
Whiteboard: fixed-in-nanojit → fixed-in-nanojit, fixed-in-tamarin
Comment 16•16 years ago
|
||
Whiteboard: fixed-in-nanojit, fixed-in-tamarin → fixed-in-nanojit, fixed-in-tamarin, fixed-in-tracemonkey
Comment 17•15 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Updated•15 years ago
|
Flags: flashplayer-bug-
You need to log in
before you can comment on or make changes to this bug.
Description
•