Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 687968

Summary: oprofile --setup not valid with --save
Product: Red Hat Enterprise Linux 6 Reporter: James M. Leddy <james.leddy>
Component: oprofileAssignee: William Cohen <wcohen>
Status: CLOSED NOTABUG QA Contact: qe-baseos-tools-bugs
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: gborsuk
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-16 21:31:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description James M. Leddy 2011-03-15 21:08:46 UTC
Description of problem:

We have scripts that start, top and save oprofile sessions with the following commands. These used to work fine under RHEL5 but we're seeing this "Option "--setup" not valid with "--save" " error under RHEL6. Is there a way to work around this?

[root@etc759679a eth0]# opcontrol --start --session-dir=/local/tmp/root.lyIVNu --vmlinux=/usr/lib/debug/lib/modules/2.6.32-71.18.1.el6.x86_64/vmlinux --separate=lib --event=CPU_CLK_UNHALTED:6000::0:1
Profiler running.
[root@etc759679a eth0]# opcontrol --stop
Stopping profiling.
[root@etc759679a eth0]# opcontrol --session-dir=/local/tmp/root.lyIVNu --dump
Option "--setup" not valid with "--dump".
[root@etc759679a eth0]# opcontrol --session-dir=/local/tmp/root.lyIVNu --save=CPU_CLK_UNHALTED
Option "--setup" not valid with "--save".

Comment 4 William Cohen 2011-03-16 20:04:44 UTC
The suggest patch is reverting a fix for the case where someone wants to use

opcontrol --setup --session-dir=blah

http://sourceforge.net/tracker/index.php?func=detail&aid=2646398&group_id=16191&atid=116191


The proposed solution is unlikely the right way to do things.

Comment 5 William Cohen 2011-03-16 21:31:13 UTC
The --session-dir shouldn't need to be used for the --dump and --save options. That information is already be in the /root/.oprofile/daemonrc file and in implicitly used by the "opcontrol --save=..." and "opcontrol --dump".

Just use:

 opcontrol --save=CPU_CLK_UNHALTED

The "--stop" implicitly does a "--dump" so the following "opcontrol --dump" is redundant.