Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8357915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T10:38:12+00:00 2026-06-09T10:38:12+00:00

Given a binary file compiled with OCaml, is there a way to find out

  • 0

Given a binary file compiled with OCaml, is there a way to find out if it has been compiled with profiling information (either using ocamlcp/ocamloptp, or with gprof-specific data via ocamlopt -p)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T10:38:14+00:00Added an answer on June 9, 2026 at 10:38 am

    If you run ocamlobjinfo on a profiled bytecode file, it shows Profiling as one of the imported interfaces:

    $ ocamlcp -c my.ml
    $ ocamlobjinfo my.cmo
    File my.cmo
    Unit name: My
    Interfaces imported:
            720848e0b508273805ef38d884a57618    Array
            d7e1aaf95ba3578d33efe347aefa6c49    My
            db723a1798b122e08919a2bfed062514    Pervasives
            6a6248bae49664a0bb530dd3f0c15b79    Profiling
    Uses unsafe features: no
    $ 
    

    Update

    On my system (OS X) A profiled native executable contains a definition of camlProfiling and related symbols:

    $ ocamlopt -o my my.ml
    $ nm my | grep camlProfiling
    $ ocamloptp -o my my.ml
    $ nm my | grep camlProfiling
    000000010003e240 D _camlProfiling
    000000010003e2e0 d _camlProfiling__1
    000000010003e300 d _camlProfiling__2
    000000010003e318 d _camlProfiling__3
    000000010003e268 d _camlProfiling__4
    000000010003e280 d _camlProfiling__5
    000000010003e2a0 d _camlProfiling__6
    000000010003e2c0 d _camlProfiling__7
    0000000100003760 T _camlProfiling__code_begin
    0000000100003ac7 T _camlProfiling__code_end
    000000010003e238 D _camlProfiling__data_begin
    000000010003e328 D _camlProfiling__data_end
    00000001000038d0 T _camlProfiling__dump_counters_1014
    0000000100003a40 T _camlProfiling__entry
    000000010003e32c D _camlProfiling__frametable
    0000000100003770 T _camlProfiling__fun_1046
    0000000100003800 T _camlProfiling__fun_1048
    0000000100003890 T _camlProfiling__incr_1010
    

    It seems very likely this will work on every system that supports nm.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Given the following Java code for generating a binary file: DataOutputStream out = new
Given a file (binary or textual), what is the fastest or most elegant way
Given the path of a file (e.g. C:\MyPicture.jpg), how do I convert a binary
Given a binary search tree (BST). Find the maximum depth of the binary search
I need to validate whether the given binary is a PE file or not
I'm working with a binary file that references another file using absolute paths. The
The AndroidManifest.xml file when compiled and packaged in the apk turns into a binary
I have a C code in long file that is compiled using cc. But
I wrote the below method to archive files into one file using binary mode:
I'm given three binary random variables: X, Y, and Z. I'm also given the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.