473,398 Members | 2,335 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

finding out what an optimizer did?

Can someone suggest guideline to follow in determining what an optimizer has
eliminated from the prescribed execution sequence? Any particular tools
people use for this? I'm working on a Linux platform. I can look at the
disassembler output, and trace the instruction pointer, but when the code
is compiled with optimization I can't see how the current instruction
relates to the original source code.

--
NOUN:1. Money or property bequeathed to another by will. 2. Something handed
down from an ancestor or a predecessor or from the past: a legacy of
religious freedom. ETYMOLOGY: MidE legacie, office of a deputy, from OF,
from ML legatia, from L legare, to depute, bequeath. www.bartleby.com/61/
Mar 12 '06 #1
2 1623
You can add function calls for which the implementation is located in
another compilation unit - in this way you shold be able to find the
function call in the assembly. You can also pass arguments to the
function to force these arguments to be calculated before the function
call.

Mar 12 '06 #2
Steven T. Hatton wrote:
Can someone suggest guideline to follow in determining what an optimizer has
eliminated from the prescribed execution sequence? Any particular tools
people use for this? I'm working on a Linux platform. I can look at the
disassembler output, and trace the instruction pointer, but when the code
is compiled with optimization I can't see how the current instruction
relates to the original source code.


Start the compiler in a gdb (or similiar) debugger,
then single step through the compiler. You sould be able
to see exactly what the optimizater does to your code.

Other than that, you are only going to be guessing.

The optimization is very dependent on the compiler, which
version it is, what options were selected, etc.
It's equivelent to running a steak through a leaky meat
grinder. Lots of stuff comes out, and some of it lands
on the floor, but if you try to determine where each bit
of meat originally came from, it's not going to be easy.

If you want to use the debugger, you should turn off
optimizations. Otherwise, you'll never know what code is
actually being executed, and any minor edit could
completely change the execution sequence.

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Mar 16 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Nick Mudge | last post by:
Hi, Does anybody know the performance difference between having your PHP code cached and just running your code with the zend optimizer? Is there much difference? Nick
9
by: hemal | last post by:
I came across a very strange situation at work. There is an order of magnitude difference in execution time for the following two queries (10 v/s ~130 msec): select count(*) from table_name...
2
by: Jon | last post by:
Hi all! In a statement I want to find the IDENTITY-column value for a row that has the smallest value. I have tried this, but for the result i also want to know the row_id for each. Can this be...
9
by: Andrea | last post by:
Hi, I've read the former postings but was not able to solve my problem: I have a Summary Table (or MQT as you like it) and the query optimizer does not seem to use the summary table. I run...
1
by: Xristos Nikolopoulos | last post by:
Hello, I have made an application that needs to upload files, the application is deployed in several folders, and each folder has its php files. The problem is, I have in the folder I want to...
3
by: aj | last post by:
DB2 LUW v8.2 FP 14 RHAS 2.1 Sorry if these are newbie questions. Optimizer stuff is black magic to me. For both of these, assume stats are current and an even distribution of data....
3
by: mson77 | last post by:
Hello ALL, This is my first message in this Forum. Regarding this title: CBO initial parameters - When, What, How to setup them. I have already read oracle documentation which explain the...
0
by: P. Adhia | last post by:
Hi, Consider the following query select * from t1 where c1 = ? and c2 = ?
3
by: npikes | last post by:
In SQL 2005 I'm writing a query that works fine as an inner select or a join but I know there's gotta be a way to do it without doing either of those, for obvious performance reasons. I just want...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.