Code Monkey home page Code Monkey logo

statmemprof-emacs's Introduction

statmemprof-emacs โ€” Emacs client for statistical memory profiler

%%VERSION%%

statmemprof-emacs is an Sturgeon/emacs front-end of the statmemprof statistical memory profiler for OCaml.

statmemprof-emacs is distributed under the MIT license.

Homepage: https://github.com/jhjourdan/statmemprof-emacs

Installation

statmemprof-emacs can be installed with opam, when one of the xxxx-statistical-memprof OCaml switches is installed. These switches are available on opam. Then you can use the following command:

opam install statmemprof-emacs

If you don't use opam consult the opam file for build instructions.

Usage

In the OCaml program you need to profile, you can start the profiling by executing the following instruction (see the documentation in statmenprof_emacs.mli for more details):

Statmemprof_emacs.start 1E-4 30 5

Then, in emacs, load the file sturgeon.el (coming with you Sturgeon installation), and type M-x sturgeon-connect.

Then, you might be asked:

  • for a path for the sturgeon-connector command, which will be in your opam swich's bin directory;
  • a socket to connect to, which emacs auto-complete will help you to find.

statmemprof-emacs's People

Contributors

hannesm avatar jhjourdan avatar rgrinberg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

statmemprof-emacs's Issues

Cannot use sturgeon-connect

I'm on a 4.05.0+statistical-memprof switch. After adding Statmemprof_emacs.start 1E-4 30 5 to my program it creates a socket in /tmp/sturgeon.1000/main.exememprof.19455.sturgeon, so that part seems to work fine.

However in emacs, when using M-x sturgeon-connect and selecting the socket file, it prints /tmp/sturgeon.1000/main.exememprof.19455.sturgeon exited with status 126.

Instructions for sturgeon-connect incomplete

The README says only: "type M-x sturgeon-connect"

When you do that, you're prompted for a socket, and the instructions here don't tell you how to find that.

For me, I found the socket in /tmp/sturgeon.1000/, apparently created by the executable I'd run with the call to Statmemprof_emacs.start. I entered that filename, not including the path; that worked.

Build of switch opam switch 4.05.0+statistical-memprof fails on OSX

When trying to build the 4.05.0 version of statmemprof, I get the following error:

[ERROR] Compiler build failed at "make world":
        # opam-version 1.2.2
        # os           darwin
        # command      make world
        # path         /Users/milodavis/.opam/4.05.0+statistical-memprof/build/ocaml
        # exit-code    2
        # env-file     /Users/milodavis/.opam/log/log-89618-d2c37b.env
        # stdout-file  /Users/milodavis/.opam/log/log-89618-d2c37b.out
        # stderr-file  /Users/milodavis/.opam/log/log-89618-d2c37b.err
        ### stdout ###
        # (echo '#define CAML_INTERNALS'; \
        # [...]
        # 	 sed -e 's/.*/extern value &();/' primitives; \
        # 	 echo 'c_primitive caml_builtin_cprim[] = {'; \
        # 	 sed -e 's/.*/	&,/' primitives; \
        # 	 echo '	 0 };'; \
        # 	 echo 'char * caml_names_of_builtin_cprim[] = {'; \
        # 	 sed -e 's/.*/	"&",/' primitives; \
        # 	 echo '	 0 };') > prims.c
        # gcc  -O2 -fno-strict-aliasing -fwrapv -D_FILE_OFFSET_BITS=64 -D_REENTRANT   -DCAML_NAME_SPACE -Wall -c prims.c
        # gcc  -O2 -fno-strict-aliasing -fwrapv -D_FILE_OFFSET_BITS=64 -D_REENTRANT -Wl,-no_compact_unwind  -o ocamlrun prims.o libcamlrun.a -lcurses
        -lpthread                  
        ### stderr ###
        # [...]
        # Undefined symbols for architecture x86_64:
        #   "_caml_stat_alloc_noexc", referenced from:
        #       _caml_memprof_postpone_track_alloc_shr in libcamlrun.a(memprof.o)
        #       _caml_memprof_track_interned in libcamlrun.a(memprof.o)
        #   "_caml_stat_resize_noexc", referenced from:
        #       _caml_memprof_track_interned in libcamlrun.a(memprof.o)
        # ld: symbol(s) not found for architecture x86_64
        # clang: error: linker command failed with exit code 1 (use -v to see invocation)
        # make[1]: *** [ocamlrun] Error 1
        # make: *** [coldstart] Error 2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.