Closed Bug 1077662 Opened 10 years ago Closed 10 years ago

Label GL calls in profiler

Categories

(Core :: Graphics, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla36

People

(Reporter: jchen, Assigned: jchen)

Details

Attachments

(2 files, 2 obsolete files)

      No description provided.
Attached patch Label GL calls in profiler (v1) (obsolete) — Splinter Review
It's kind of hacky to get the function name to work as a profiler label, but I'm proud that it actually works.
Attachment #8504130 - Flags: review?(snorp)
Add a PROFILER_LABEL_FUNC macro to use the enclosing function's name as the profiler label. Because __func__ acts as a static local variable, it cannot be concatenated like a regular string literal, so it cannot be used with the regular PROFILER_LABEL macro.
Attachment #8504891 - Flags: review?(bgirard)
Attached patch Label GL calls in profiler (v2) (obsolete) — Splinter Review
Switch to using PROFILER_LABEL_FUNC macro.
Attachment #8504130 - Attachment is obsolete: true
Attachment #8504130 - Flags: review?(snorp)
Attachment #8504894 - Flags: review?(snorp)
Attachment #8504891 - Flags: review?(bgirard) → review+
Comment on attachment 8504894 [details] [diff] [review]
Label GL calls in profiler (v2)

Review of attachment 8504894 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/gl/GLLibraryEGL.h
@@ +76,5 @@
>  # endif
>  #endif
>  
> +#define BEFORE_GL_CALL                      \
> +    PROFILER_LABEL_FUNC(                    \

Maybe this should be #ifdef fennec only with a comment explaining the use case. We typically walk the stack + symbolicate so this isn't really needed else where. I'm presuming your use case is for the Fennec hang detector where this is probably the best way to get your data.
Attachment #8504894 - Flags: review?(snorp) → review+
Added ifdef's for Android
Attachment #8504894 - Attachment is obsolete: true
Attachment #8504966 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/0f0245389d0d
https://hg.mozilla.org/mozilla-central/rev/760ffe808152
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in before you can comment on or make changes to this bug.