- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[bash]
We want the ability to start profiling after X number of seconds while starting the profile from the command line. We can currently achieve this on the algorithmic-based collections (i.e. hotspots, concurrency, locks and waits) by passing in: -resume-after 60000 as an option to amplxe-cl However, whenever we run --collect core2_cycles-uops, it will not run if -resume-after 60000 is included. Is there a way to get these types of collections to only start after some period of time? // Works amplxe-cl --collect concurrency -follow-child -target-duration-type=short -no-allow-multiple-runs -no-analyze-system -data-limit=100 -slow-frames-threshold=40 -fast-frames-threshold=100 -resume-after 60000 --duration 300 -- /home/q/kewpie/current/bin/kewpie --app_instance=1 // Does not work amplxe-cl --collect core2_cycles-uops -follow-child -target-duration-type=short -no-allow-multiple-runs -no-analyze-system -data-limit=100 -slow-frames-threshold=40 -fast-frames-threshold=100 -resume-after 60000 --duration 300 -- /home/q/kewpie/current/bin/kewpie --app_instance=1 Unknown option: --resume-after Sampling collector options are incorrect; collection cannot continue. Please try again. // Works (notice we just removed the -resume-after 60000) amplxe-cl --collect core2_cycles-uops -follow-child -target-duration-type=short -no-allow-multiple-runs -no-analyze-system -data-limit=100 -slow-frames-threshold=40 -fast-frames-threshold=100 --duration 300 -- /home/q/kewpie/current/bin/kewpie --app_instance=1 [/bash]
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[root@kentsfield-01 src]# cd /opt/intel/vtune_amplifier_xe_2011/samples/en/
[root@kentsfield-01 en]# ls
tachyon_vtune_amp_xe.tar.gz
[root@kentsfield-01 en]# tar xzf tachyon_vtune_amp_xe.tar.gz
[root@kentsfield-01 en]# make
tbbforexamples/2.2/set_tbb_symlinks.sh
check_for_valid_platform
....
amplxe-cl -collect concurrency -resume-after 5000 -duration 30 -- ./tachyon_analyze_locks
It works!
amplxe-cl -collect core2_cycles-uops -resume-after 5000 -duration 30 -- ./tachyon_analyze_locks
It reported, "Unknown option: --resume-after", "Sampling collector option are incorrect"
I will submit this problem to engineering team, and re-post the solution on this thread. Thanks for your valuable report.
Regards, Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A workaround is to use the -start-paused option, and then run amplxe-cl with the '-command resume' option after the desired delay.
The sequence of commands as a bash script:
#!/bin/sh
amplxe-cl -collect core2_cycles-uops -start-paused
sleep 60
amplxe-cl -command resume
wait
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Another workaround is to start data collection in pause mode; Insert Pause/Resume API in users code, see this article.
The user has to use "-duration xxx" in
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've tried the amplxe-cl -command resume but returning this message:
Fatal error: Cannot detect running collection to deliver command.
What I've did is:
#!/bin/bash
amplxe-cl -collect=locksandwaits -start-paused
sleep 60
amplxe-cl -command resume
wait
Is there any way I could decide when to start the sampling and when to stop? I prefer not using user-controlcode APIs.
Thanks,
Dongwon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Since "resume-after" option can work on user-modedata collections (hotspots, concurrency, locksandwaits), there is no necessary to use "start-pause" in command line.
Here is example and its output from my side:
=====================================================================
[root@NHM02 ~]# amplxe-cl -collect lightweight-hotspots -start-pause -duration 60 &
[1] 19989
[root@NHM02 ~]# amplxe-cl -command resume &
[2] 20025
[root@NHM02 ~]# Sampling successfully resumed.
1> The sampling collection paused.
1> The sampling collection resumed.
1>
Using result path `/root/r014lh'
Executing actions 75 % Generating a report
Summary
-------
Elapsed Time: 44.669
Executing actions 100 % done
[1]- Done amplxe-cl -collect lightweight-hotspots -start-pause -duration 60
[2]+ Done amplxe-cl -command resume
=================================================================
By the way, if you don'tuse APIs in code to control, so you use sleep to know whento start and use duration to know when to stop.
Regards, Peter

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page