Closed Bug 406079 Opened 17 years ago Closed 17 years ago

--enable-dtrace broken

Categories

(Core :: JavaScript Engine, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: hello, Assigned: hello)

References

Details

Attachments

(1 file, 2 obsolete files)

My build dies with:

mozilla/js/src/jsdtracef.c:202: error: 'struct JSFunction' has no member named 'clasp'

This is because this commit:

http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&root=/cvsroot&subdir=/mozilla/js/src&command=DIFF_FRAMESET&file=jsfun.h&rev2=3.49&rev1=3.48

Moved clasp, but jsdtracef.c hasn't changed to use ->u.n.clasp.

Attached a patch I'm building with now; still untested (my build got past /js, but hasn't finished yet).
Attachment #290765 - Flags: review?(sayrer)
Comment on attachment 290765 [details] [diff] [review]
JSFunction->clasp fixes.  Use -p1 to apply.

> void
> jsdtrace_function_entry(JSContext *cx, JSStackFrame *fp, JSFunction *fun)
> {
>     JAVASCRIPT_FUNCTION_ENTRY(
>         jsdtrace_filename(fp),
>-        fun->clasp ? (char *)fun->clasp->name : dempty,
>+        fun->u.n.clasp ? (char *)fun->u.n.clasp->name : dempty,

This is wrong, the proper fix is to change the line into:

!FUN_INTERPRETED(fun) && fun->u.n.clasp ? (char *)fun->u.n.clasp->name : dempty
Attached patch Patch v1.1 (obsolete) — Splinter Review
Thanks, Igor.  Here's a new patch with your fix.
Assignee: general → thunder
Attachment #290765 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #290777 - Flags: review?(igor)
Attachment #290765 - Flags: review?(sayrer)
Comment on attachment 290777 [details] [diff] [review]
Patch v1.1

> void
> jsdtrace_function_entry(JSContext *cx, JSStackFrame *fp, JSFunction *fun)
> {
>     JAVASCRIPT_FUNCTION_ENTRY(
>         jsdtrace_filename(fp),
>-        fun->clasp ? (char *)fun->clasp->name : dempty,
>+        !FUN_INTERPRETED(fun) &&
>+            fun->u.n.clasp ? (char *)fun->u.n.clasp->name : dempty,

Sorry I was not clear last time but I meant to protect all usages of u.n.clasp in the patch with !FUN_INTERPRETED(fun). That also suggests to have a utility function to get the class name for a function ot dempty.
Attached patch Patch v2Splinter Review
Igor, is this patch the right way to go?
Attachment #291627 - Flags: review?(igor)
Comment on attachment 291627 [details] [diff] [review]
Patch v2

Yes, this is it.
Attachment #291627 - Flags: review?(igor) → review+
Keywords: checkin-needed
Attachment #290777 - Attachment is obsolete: true
Attachment #290777 - Flags: review?(igor)
Attachment #291627 - Flags: approval1.9?
Keywords: checkin-needed
Comment on attachment 291627 [details] [diff] [review]
Patch v2

a=drivers for M10, as this code only affects people running with dtrace enabled, and I'd rather get more perf data work done sooner than later :)
Attachment #291627 - Flags: approvalM10+
Attachment #291627 - Flags: approval1.9?
Attachment #291627 - Flags: approval1.9+
Recording regression dependency 
Blocks: 399544
I checked in the patch from comment 4 to the CVS trunk:

Checking in jsdtracef.c;
/cvsroot/mozilla/js/src/jsdtracef.c,v  <--  jsdtracef.c
new revision: 3.2; previous revision: 3.1
done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Flags: in-testsuite-
Flags: in-litmus-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: