Closed Bug 515545 Opened 15 years ago Closed 15 years ago

Add EXECUTE_TREE_TIMER code for Windows x64

Categories

(Core :: JavaScript Engine, defect)

x86_64
Windows 2000
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla1.9.3a1

People

(Reporter: m_kato, Assigned: m_kato)

References

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(2 files, 3 obsolete files)

Attached patch patch v1 (obsolete) — Splinter Review
VC++ dones't support inline assembler, so we must use build-in function for rdtsc
Attachment #399648 - Flags: review?(dvander)
Could we just use the compiler intrinsic for both architectures?
(In reply to comment #1)
> Could we just use the compiler intrinsic for both architectures?

__rdtsc is provided on both x86 and x64.  But old compiler (VC++7.1?) doesn't support this intrinsic.  I believe that Neil uses VC++7.1, so we should not replace x86 inline assembler with inctinsic version.
Looks like I'm in luck: my WinNT.h contains #pragma intrinsic(__rdtsc)
Makoto: With Neil's comment is it okay? I'm in favor of reducing platform #ifdefs and inline assembly.
(In reply to comment #4)
> Makoto: With Neil's comment is it okay? I'm in favor of reducing platform
> #ifdefs and inline assembly.

OK, I write new patch, then I will send review to you.
Attached patch patch v2 (obsolete) — Splinter Review
Attachment #399648 - Attachment is obsolete: true
Attachment #399648 - Flags: review?(dvander)
Attachment #403208 - Flags: review?(dvander)
Attachment #403208 - Flags: review?(dvander) → review+
Attached patch patch v3 (obsolete) — Splinter Review
Previous patch breaks on x86.  Now testing more.
Attachment #403208 - Attachment is obsolete: true
#include <intrin.h> cause build error on VC++ 2005 x86.  So remove it (because it is already defined in WinNT.h)
Assignee: general → m_kato
Attachment #403936 - Attachment is obsolete: true
Attachment #404191 - Flags: review?(dvander)
Attachment #404191 - Flags: review?(dvander) → review+
http://hg.mozilla.org/tracemonkey/rev/3cd616d615cd
Whiteboard: fixed-in-tracemonkey
http://hg.mozilla.org/mozilla-central/rev/3cd616d615cd
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
(In reply to comment #3)
> Looks like I'm in luck: my WinNT.h contains #pragma intrinsic(__rdtsc)
So, I think this was because it was in my Vista SDK; it's not in the VC7 headers. Also, another machine I have with VC8 but only the Windows Server 2003 SDK doesn't compile this because it too is missing the intrinsic.
(In reply to comment #11)
> (In reply to comment #3)
> > Looks like I'm in luck: my WinNT.h contains #pragma intrinsic(__rdtsc)
> So, I think this was because it was in my Vista SDK; it's not in the VC7
> headers. Also, another machine I have with VC8 but only the Windows Server 2003
> SDK doesn't compile this because it too is missing the intrinsic.

Humm, when I add #include <intrin.h> like patch v3 with VC8 + Vista SDK or Win7 SDK, VC8 throws unexpected build error (comment #8).  This issue seems to be fixed by VC9.

David, I think patch v1 is better (use inline asm for x86 and intrin function for x64).  How do you think?
FYI, I added these lines so that I could compile with VC8Express + 2003SDK:
>extern "C" unsigned __int64 __rdtsc(void);
>#pragma intrinsic(__rdtsc)
As for VC7, I've given up; I can't work around vprof.h's varadic macros.
(In reply to comment #13)
> VC8Express + 2003SDK:

That's what I'm using too (FF 3.7 32bit build) and I "still" get
{
jsapi.cpp
...\js\src\nanojit\avmplus.h(106) : error C3861: '__rdtsc': identifier not found
}

Is this bug actually (fully) fixed?
OS: Windows NT → Windows 2000
Target Milestone: --- → mozilla1.9.3a1
(In reply to comment #12)
> David, I think patch v1 is better (use inline asm for x86 and intrin function
> for x64).  How do you think?

Sorry for late reply. Sure, v1 is okay if this is going to cause problems.
Please, fix comment 14 failure.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attachment #404191 - Attachment description: patch v3.1 → patch v3.1 [Checkin: Comment 9 & 10]
Attachment #408261 - Flags: review?(dvander)
Attachment #408261 - Flags: review?(dvander) → review+
Attachment #408261 - Attachment description: patch v4 → patch v4 [Checkin: Comment 18]
Flags: in-testsuite-
http://hg.mozilla.org/mozilla-central/rev/1549b37afb8f
Status: REOPENED → RESOLVED
Closed: 15 years ago15 years ago
Resolution: --- → FIXED
V.Fixed, I can build (SM) trunk locally again.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: