Closed
Bug 27335
Opened 25 years ago
Closed 23 years ago
Stopwatch doesn't work on Linux
Categories
(Core Graveyard :: Tracking, defect, P3)
Tracking
(Not tracked)
VERIFIED
FIXED
M16
People
(Reporter: BenB, Assigned: cls)
References
Details
(Keywords: platform-parity)
Attachments
(1 file, 1 obsolete file)
Reproduce:
Change
EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS)
to
EXTRA_DSO_LDOPTS += -L$(DIST)/lib -lmozutil_s -ltimer_s $(MOZ_COMPONENT_LIBS)
(maybe also -lutil ?)
in netwerk/streamconv/converters/Makefile
Change
#define ENABLE_DEBUG_OUTPUT PR_FALSE
to
#define ENABLE_DEBUG_OUTPUT PR_TRUE
in modules/linutil/public/nsTimer.h and add
#define MOZ_PERF_METRICS
before
#ifdef MOZ_PERF_METRICS
Recompile netwerk/streamconv/converters/
View a msg
Actual Result:
Something like
MIME Total Processing Time: Real time 1544444:71582814:-2147483648, CP time
5100000000,000
mozTXTToHTMLConv::ScanTXT(): Real time 58333:20:0, CP time 210000000,000
...
should appear on the console.
Expected result:
Something like
MIME Total Processing Time: Real time 0:0:3, CP time ????????,???
mozTXTToHTMLConv::ScanTXT(): Real time 0:0:1, CP time ????????,???
...
should appear on the console.
I need a stopwatch for my work on bug #26915, which is sheduled for M14. A
simple
PRTime parsing = PR_IntervalNow();
...
printf("end %d ", PR_IntervalNow() - parsing);
doesn't work, because my function is called multiple times during msg parsing
(for every line), and if I measure the whole operation, I have the download
included.
Maybe it's just a failue on my side, but I found noone, who could help me with
that. rhp reports, that the same code worked for him on win32 some time ago
(where I tried to get it working the first time, but got the same results).
Sorry for the serverity blocker, but I don't know, how to help me anymore.
hmm, I'm not sure chofmann is the correct person for this. Chris - can you pass
to the correct person so that Ben can get his M14 bug addressed?
Comment 2•25 years ago
|
||
I'm not sure, but this looks like a request for an nspr feature.
wtc would be the guy if thats right. supreme hacking monsters
sppizter or alecf might have ideas on work arounds or other approaches.
Assignee: chofmann → wtc
Comment 3•25 years ago
|
||
This stuff uses some system calls, I'm wondering if they're just busted, or the
calls are wrong.
Reporter | ||
Comment 4•25 years ago
|
||
>I'm not sure, but this looks like a request for an nspr feature.
If I'm right, it is an existing feature, that is supposed to work on Linux, but
doesn't for some reason.
Comment 5•25 years ago
|
||
I only work on NSPR. I do not work on mozilla.
I don't understand what is the NSPR feature you were
referring to. Is it possible to describe the bug
using only NSPR? I don't know what 'stopwatch' is.
I don't know what files to look at.
Comment 6•25 years ago
|
||
right, this should not be wtc's bug.
re-assigning to owner of the component.
Assignee: wtc → chofmann
Reporter | ||
Comment 7•25 years ago
|
||
I don't know these functions well either, I'm just a user of them.
Here's what I found out:
I'm using macros from nsTimer.h
<http://lxr.mozilla.org/seamonkey/source/modules/libutil/public/nsTimer.h>,
which uses Stopwatch
<http://lxr.mozilla.org/seamonkey/source/modules/libutil/src/stopwatch.cpp>,
which seems to use clock() <http://lxr.mozilla.org/seamonkey/ident?i=clock>.
Reporter | ||
Comment 8•25 years ago
|
||
Have some kind of workaround, removing dependency and lowering severity.
However, this bug is still important for my performance work, so severity
"major".
No longer blocks: 26915
Severity: blocker → major
Reporter | ||
Updated•25 years ago
|
Severity: major → normal
Target Milestone: M14 → M16
Comment 9•25 years ago
|
||
cls or other.. do you know what needs to be done to fix this?
Assignee: chofmann → cls
Assignee | ||
Comment 10•25 years ago
|
||
*** Bug 36917 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 11•25 years ago
|
||
The MOZ_PERF & MOZ_PERF_METRICS variables are out of sync.
Status: NEW → ASSIGNED
Assignee | ||
Comment 12•25 years ago
|
||
Assignee | ||
Comment 13•25 years ago
|
||
Content creation time (this=0x8922d68): Real time 0:2:30.0, CP time 80.000
Reflow time (this=0x86acf40): Real time 0:0:10.0, CP time 20.000
Frame construction plus style resolution time (this=0x86acf40): Real time
0:7:30.0, CP time 430.000
There are still a number of entries with times of 0:0:0.0 but that may be
normal. Marking fixed.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 14•25 years ago
|
||
Thanks for fixing this!
Is it/will it be yet checked in?
However, I won't have a chance to take advantage of it in the near future - I'm
working on other bugs/projects :-(.
Assignee | ||
Comment 15•25 years ago
|
||
It's been checked in.
Comment 16•24 years ago
|
||
Per last comments, looks like fixed. Ben please reopen if not the case.
Status: RESOLVED → VERIFIED
Comment 17•23 years ago
|
||
This works on Linux, but the times reported are wrong because
sysconf(_SC_CLK_TCK) at
http://lxr.mozilla.org/seamonkey/source/modules/libutil/src/stopwatch.cpp#25
never gets called.
Additionally, a real time of 10ms is reported as 0:0:0.10 instead of 0:0:0.010
(on all platforms).
Comment 18•23 years ago
|
||
Reporter | ||
Comment 19•23 years ago
|
||
Andreas M. "Clarence" Schneider, can you file a new bug, please? I'd like to
forget about this old bug. Thanks.
Status: REOPENED → RESOLVED
Closed: 25 years ago → 23 years ago
Resolution: --- → FIXED
Updated•14 years ago
|
Attachment #8308 -
Attachment description: Change remaining uses of MOZ_PERF on unix to MOZ_PERF_METRICS (run autoconf after patching) → Change remaining uses of MOZ_PERF on unix to MOZ_PERF_METRICS (run autoconf after patching)
[Checked in: Comment 15]
Updated•14 years ago
|
Attachment #46689 -
Attachment description: patch to report correct times → patch to report correct times
[See bug 96669]
Attachment #46689 -
Attachment is obsolete: true
Updated•8 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•