Closed Bug 767844 Opened 12 years ago Closed 12 years ago

Store meta data in profile

Categories

(Core :: Gecko Profiler, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla16

People

(Reporter: BenWa, Assigned: BenWa)

Details

Attachments

(2 files, 2 obsolete files)

Attached patch Store meta data in profile (obsolete) — Splinter Review
I want to collect more meta data inside the profile. The platform can be obvious from the profile (sometimes) but knowing the profiling features and configuration can be useful. Once this patch lands I can modify Cleopatra to display this information

Actually I also wanted to add product name (Firefox Vs. Thunderbird, Fennec Vs. b2g) and it's not in this patch.
Attachment #636202 - Flags: review?(jmuizelaar)
Sample profile:
{
    "meta": {
        "version": 2,
        "interval": 1,
        "stackwalk": 0,
        "jank": 0,
        "platform": "Macintosh",
        "oscpu": "Intel Mac OS X 10.7",
        "misc": "rv:16.0",
        "abi": "x86-gcc3",
        "toolkit": "cocoa"
    },
    "threads": [{
        "samples": [{
            "name": "(root)",
            "frames": [{
                "location": "Startup::XRE_Main"
            }, {
                "location": "Events::ProcessGeckoEvents"
            }, {
                "location": "Timer::Fire"
            }, {
                "location": "JS::CallEventHandler"
            }, {
                "location": "0x443c7f9"
            }],
            "responsiveness": 0.07739
        }]
    }]
}
Attached patch Store meta data in profile (obsolete) — Splinter Review
I added the process type (for multi-process support) and the product name.
Assignee: nobody → bgirard
Attachment #636202 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #636202 - Flags: review?(jmuizelaar)
Attachment #636211 - Flags: review?(jmuizelaar)
Cleopatra will now display relevant metadata if present in the profile:
https://github.com/bgirard/cleopatra/commit/48374ebbbaa86e635c700c88954eb1018feeba16
Attached image screenshot
Comment on attachment 636211 [details] [diff] [review]
Store meta data in profile

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

::: tools/profiler/TableTicker.cpp
@@ +525,5 @@
> +    res = appInfo->GetName(string);
> +    if (!NS_FAILED(res))
> +      b.DefineProperty(meta, "product", string.Data());
> +  }
> +

This should be a separate function. Have it return a JSObject *
Attachment #636211 - Flags: review?(jmuizelaar) → review+
Good idea
Carry foward r+
Attachment #636986 - Flags: review+
Attachment #636211 - Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/cd361ba7118e
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: