Closed
Bug 106551
Opened 24 years ago
Closed 24 years ago
nsITimelineService needs work
Categories
(Core :: XPCOM, defect, P3)
Tracking
()
RESOLVED
FIXED
mozilla0.9.7
People
(Reporter: dp, Assigned: dp)
Details
Attachments
(4 files, 1 obsolete file)
|
4.42 KB,
patch
|
dp
:
review+
sfraser_bugs
:
superreview+
|
Details | Diff | Splinter Review |
|
5.32 KB,
patch
|
samir_bugzilla
:
review+
dp
:
superreview+
|
Details | Diff | Splinter Review |
|
1.82 KB,
patch
|
samir_bugzilla
:
review+
|
Details | Diff | Splinter Review |
|
4.82 KB,
patch
|
samir_bugzilla
:
review+
sfraser_bugs
:
superreview+
|
Details | Diff | Splinter Review |
The following needs to be added
- NS_TIMELINE_RESET_TIMER
- NS_TIMELINE_MARK_TIMER needs to take a text that can be printed along with the
timer output.
| Assignee | ||
Updated•24 years ago
|
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → mozilla0.9.7
| Assignee | ||
Comment 1•24 years ago
|
||
Also making the output be controlled by PRLog mechanism and going to a file
would be good.
Comment 2•24 years ago
|
||
Comment 3•24 years ago
|
||
Already have r=dp. Someone want to give me an sr for the reset patch (id=57659)?
| Assignee | ||
Updated•24 years ago
|
Attachment #57659 -
Flags: review+
| Assignee | ||
Comment 4•24 years ago
|
||
This patch adds the ability for MarkTimer to take a user string that will get
displayed in the output. PR_LoadLibrary marks use this to display which dll is
being loaded.
| Assignee | ||
Comment 5•24 years ago
|
||
Simon, sr= ? for the two patches here. Doug/Samir, wanna r= the MarkTimer patch.
I would like to get this in as early as possible as it aids in perf analysis -
dlls loaded
Comment 6•24 years ago
|
||
Comment on attachment 57659 [details] [diff] [review]
Reset timer implementation.
sr=sfraser
Attachment #57659 -
Flags: superreview+
Comment 7•24 years ago
|
||
It might be slightly better to have the macro supply the nsnull:
#define NS_TIMELINE_MARK_TIMER(timerName) NS_TimelineMarkTimer(timerName, nsnull)
rather than using C++ default values. Either way, sr=sfraser on the second patch.
| Assignee | ||
Comment 8•24 years ago
|
||
Comment on attachment 58075 [details] [diff] [review]
Implements ability to display user strings with MarkTimer. Used by load library marks.
Sr. Simon says yes.
Attachment #58075 -
Flags: superreview+
Comment 9•24 years ago
|
||
Comment on attachment 58075 [details] [diff] [review]
Implements ability to display user strings with MarkTimer. Used by load library marks.
r=sgehani
Simon, for the mac, could we pass the C string representation of
mTargetSpec.name to NS_TIMELINE_MARK_TIMER1().?
Attachment #58075 -
Flags: review+
Comment 10•24 years ago
|
||
Sure. You'd need Pascal-to-C string conversion, but that would be good.
| Assignee | ||
Comment 11•24 years ago
|
||
So would I do something like : (I confess. Pascal was 12 years ago)
#ifdef MOZ_TIMELINE
char *p = mTargetSpec.name;
int n = *p++;
char buf[128];
strncpy(buf, p, n);
buf[n] = '\0';
NS_TIMELINE_MARK_TIMER1("PR_LoadLibrary", buf);
#endif
Comment 12•24 years ago
|
||
If PLStringsFuncs is available you can use that. If not here's one implementation:
<http://lxr.mozilla.org/seamonkey/source/xpfe/bootstrap/appleevents/nsMacUtils.cpp#144>
| Assignee | ||
Comment 13•24 years ago
|
||
Facility to time functions
Comment 14•24 years ago
|
||
+class nsFnTime {
Ugly name :)
+public:
+ char mTimer[64];
+ PRBool mMark;
+ nsFnTime(const char *timer, PRBool mark) : mMark(mark)
How about defaulting mark to PR_FALSE?
+ {
+ strcpy(mTimer, timer);
Hoo, you'd better be sure they passed a string < 64 bytes long. Maybe a strncpy?
| Assignee | ||
Updated•24 years ago
|
Attachment #58372 -
Attachment is obsolete: true
| Assignee | ||
Comment 15•24 years ago
|
||
Turns out that I cant use a buffer for timername as these are added into the
hash table and hence needs to be around forever :-) So I dont use a buffer.
This is the way all of timeline is designed. We should change that if we feel
the need enmass.
Rest of simon's comments taken. I put the default for mark as TRUE.
Comment 16•24 years ago
|
||
Comment on attachment 58550 [details] [diff] [review]
NS_TIMELINE_MARK_FUNCTION
r=sgehani
Attachment #58550 -
Flags: review+
Comment 17•24 years ago
|
||
Minor nit. You can change:
+#define NS_TIMELINE_MARK_FUNCTION(timer) nsFunctionTimer functionTimer(timer, 1
/* mark */)
+#define NS_TIMELINE_TIME_FUNCTION(timer) nsFunctionTimer functionTimer(timer, 0
/* no mark, only time */)
to
+#define NS_TIMELINE_MARK_FUNCTION(timer) nsFunctionTimer functionTimer(timer) /*
mark */
+#define NS_TIMELINE_TIME_FUNCTION(timer) nsFunctionTimer functionTimer(timer,
PR_FALSE) /* no mark, only time */
sr=sfraser
| Assignee | ||
Comment 18•24 years ago
|
||
sfraser - sure will do.
| Assignee | ||
Comment 19•24 years ago
|
||
Adds support for NS_TIMELINE_MARK_FUNCTION1 that takes an additional string.
Also NS_TIMELINE_DISABLE will disable timeline at runtime. This can be used to
see if eliminate any skew that timeline causes in overall start time
measurement.
Comment 20•24 years ago
|
||
Comment on attachment 59176 [details] [diff] [review]
Runtime disable of timeline; NS_TIMELINE_MARK_FUNCTION1
+ if (LL_IS_ZERO(initTime)) {
+ TimelineInit();
Where did initTime come from? Oh, look, it's a global! It would be nice to
rename the globals to have names like gInitTime etc.
sr=sfraser either way.
Attachment #59176 -
Flags: superreview+
Comment 21•24 years ago
|
||
Comment on attachment 59176 [details] [diff] [review]
Runtime disable of timeline; NS_TIMELINE_MARK_FUNCTION1
Change:
>+int g_timelineDisabled = PR_FALSE;
to:
PRBool g_timelineDisabled = PR_FALSE;
r=sgehani
Attachment #59176 -
Flags: review+
| Assignee | ||
Comment 22•24 years ago
|
||
samir - did your proposed change.
simon - there are a few more globals. Thought I would change their names enmass.
So didnt do it now.
thanks for review guys.
| Assignee | ||
Comment 23•24 years ago
|
||
All the patches have been checked in.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•