As a security precaution, we have turned on the setting "Require API key authentication for API requests" for everyone. If this has broken something, please contact bugzilla-admin@mozilla.org
Last Comment Bug 767844 - Store meta data in profile
: Store meta data in profile
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Gecko Profiler (show other bugs)
: unspecified
: x86 Mac OS X
: -- normal (vote)
: mozilla16
Assigned To: Benoit Girard (:BenWa)
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-24 16:47 PDT by Benoit Girard (:BenWa)
Modified: 2012-06-28 01:09 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Store meta data in profile (2.60 KB, patch)
2012-06-24 16:47 PDT, Benoit Girard (:BenWa)
no flags Details | Diff | Splinter Review
Store meta data in profile (3.00 KB, patch)
2012-06-24 19:22 PDT, Benoit Girard (:BenWa)
jmuizelaar: review+
Details | Diff | Splinter Review
screenshot (33.88 KB, image/png)
2012-06-24 21:29 PDT, Benoit Girard (:BenWa)
no flags Details
Store meta data in profile (3.87 KB, patch)
2012-06-26 20:43 PDT, Benoit Girard (:BenWa)
b56girard: review+
Details | Diff | Splinter Review

Description User image Benoit Girard (:BenWa) 2012-06-24 16:47:02 PDT
Created attachment 636202 [details] [diff] [review]
Store meta data in profile

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.
Comment 1 User image Benoit Girard (:BenWa) 2012-06-24 16:47:18 PDT
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
        }]
    }]
}
Comment 2 User image Benoit Girard (:BenWa) 2012-06-24 19:22:11 PDT
Created attachment 636211 [details] [diff] [review]
Store meta data in profile

I added the process type (for multi-process support) and the product name.
Comment 3 User image Benoit Girard (:BenWa) 2012-06-24 21:28:49 PDT
Cleopatra will now display relevant metadata if present in the profile:
https://github.com/bgirard/cleopatra/commit/48374ebbbaa86e635c700c88954eb1018feeba16
Comment 4 User image Benoit Girard (:BenWa) 2012-06-24 21:29:38 PDT
Created attachment 636226 [details]
screenshot
Comment 5 User image Jeff Muizelaar [:jrmuizel] 2012-06-26 19:56:17 PDT
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 *
Comment 6 User image Benoit Girard (:BenWa) 2012-06-26 20:20:31 PDT
Good idea
Comment 7 User image Benoit Girard (:BenWa) 2012-06-26 20:43:56 PDT
Created attachment 636986 [details] [diff] [review]
Store meta data in profile

Carry foward r+
Comment 9 User image Ed Morley [:emorley] 2012-06-28 01:09:18 PDT
https://hg.mozilla.org/mozilla-central/rev/cd361ba7118e

Note You need to log in before you can comment on or make changes to this bug.