Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2010
    Posts
    2

    Unanswered: Profiling the shared libraries w/ native compilation

    Status quo
    Using Oracle 10 native compilation works very well. However I would like to gain additional speed using rofile-based optimization:
    In general it is a three-step process:
    1. Instrumentation: Compile the program to prepare it for profile
    collection.
    cc +Oprofile=collect +O2 -c sample.c
    cc -o sample.exe +Oprofile=collect +O2 sample.o
    2. Data collection: Run the program with representative input(s) to
    collect statistics.
    sample.exe < input.file1
    sample.exe < input.file2
    3. Optimization: Recompile to optimize based on profile data.
    cc +Oprofile=use +O2 -c sample.c
    cc -o sample.exe +Oprofile=use +O2 sample.o


    As I have only shared libraries but no executables I have to define SHLIB_FLOW_DATA:
    To profile shared libraries, you must set the environment variable SHLIB_FLOW_DATA to the file that receives profile data. Unlike FLOW_DATA, SHLIB_FLOW_DATA has no default output file. If SHLIB_FLOW_DATA is not set, profile data is not collected. This allows you to activate or suspend the profiling of instrumented shared libraries.
    Note that you could set SHLIB_FLOW_DATA to flow.data which is the same file as the default setting for FLOW_DATA. But, again, profile data will not be collected from shared libraries unless you explicitly set SHLIB_FLOW_DATA to some output file.


    Question How and where can I set this variable for native compilation?

    The problem is: whatever I tried in step 3. +Oprofile=use it always complains it can not find the profile statistics and does not compile.

    Any help is appreciated very much!
    Best regards!

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >However I would like to gain additional speed using rofile-based optimization:
    Post proof the above is true.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Mar 2010
    Posts
    2
    How can I proof that I would like to do something?
    And how can I proof profiling libraries leads to better performance if it does not work yet?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •