Closed Bug 1084226 Opened 10 years ago Closed 10 years ago

Add a new TaskTracer feature to profile.sh

Categories

(Core :: Gecko Profiler, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
2.1 S8 (7Nov)

People

(Reporter: shelly, Assigned: shelly)

References

Details

Attachments

(1 file, 2 obsolete files)

Hi BenWa, could you review the change in profile.sh? or could you pass it to someone who is a better fit? Thank you! This is a follow up from bug 992454, using profile.sh to trigger and control TaskTracer. How to use TaskTracer with GeckoProfiler: To start logging TaskTracerr data: ./profile start -f tasktracer -> This also starts profiling with sps on all current running processes. To save out the log data: ./profile capture -> In addition to the original sps data, you'll find a 'tasktracer' object inserted in the result json file. The recording time period is from the start command to this capture command. To save out the log data again: ./profile capture -> Same as above, expect that the recording time period is from the last capture command to this capture command. To stop: ./profile stop -> Stop profiling and reboot b2g.
Blocks: 995058
Attached file Add feature TaskTracer to profile.sh (obsolete) —
Assignee: nobody → slin
Attachment #8506721 - Flags: review?(bgirard)
Comment on attachment 8506721 [details] [review] Add feature TaskTracer to profile.sh Please r? when you've had a change to look at my comment.
Attachment #8506721 - Flags: review?(bgirard)
Attached patch test_tt_profile.diff (obsolete) — Splinter Review
Hi Thinker, The change is suppose to set $TASKTRACER_FEATURE="true" in start_with_args(), and echo it out with value "true" in cmd_signal().
Attachment #8509379 - Flags: feedback?(tlee)
Comment on attachment 8509379 [details] [diff] [review] test_tt_profile.diff Since these two functions are called in separated process, global variables would not survive through processes.
Attachment #8509379 - Flags: feedback?(tlee)
I hate shell scripting....lol
Sorry for the late update, there's only a line changed from the last patch, if [ -n "`echo $features | grep tasktracer`" ] so that tasktracer can be enabled with other features.
Attachment #8506721 - Attachment is obsolete: true
Attachment #8509379 - Attachment is obsolete: true
Attachment #8512414 - Flags: review?(bgirard)
This patch will make it impossible to do something like this: ./profile.sh start -p b2g -t Compositor -f js,gpu,tasktracer -> now all profiles are started with these options, which should only apply to the b2g process ./profile.sh start -p Homescreen -> ignored because we already started profiling with the wrong options above. Can we require and document that the user has to start profiling on the b2g process as well as the process they want to watch and use -f tasktracer on both or is that too confusing?
Sure, should I put the message as a comment in profile.sh? or the MDN page, and just wanna make sure, do you mean documenting something like "Once you turn on -f tasktracer, profiling will start profiling on all current running processes, and ignores later start commands on a process that has started profiling."? I've echo a message saying "Enable feature TaskTracer requires profiling on all current running processes.", if the -f parameters includes "tasktracer" though.
That's not what I meant but I don't want to delay this any more. Let's take this patch and fix this up later if it's a problem.
Attachment #8512414 - Flags: review?(bgirard) → review+
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 10 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 2.1 S8 (7Nov)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: