GithubHelp home page GithubHelp logo

gobject-list's Introduction

gobject-list
============

A simple LD_PRELOAD library for tracking the lifetime of GObjects. When loaded
into an application, it prints a list of living GObjects on exiting the
application (unless the application crashes), and also prints reference count
data when it changes. SIGUSR1 or SIGUSR2 can be sent to the application to
trigger printing of more information.


Usage
-----

LD_PRELOAD=/path/to/libgobject-list.so /path/to/my-app
kill -SIGUSR1 `pidof my-app`  # print a list of currently alive objects
kill -SIGUSR2 `pidof my-app`  # create a checkpoint and print a list of objects
                              # created and destroyed since the previous
                              # checkpoint

If running your application within a debugger, you can list the currently alive
objects at any point by manually sending the SIGUSR1 signal. e.g. In gdb:
    handle SIGUSR1 nostop  # do this once, at startup
    signal SIGUSR1


Environment variables
---------------------

The following environment variables may be set to affect the output printed by
gobject-list.

GOBJECT_LIST_DISPLAY:
	Comma-separated list of types of messages to print. The list may
	contain:
	 • ‘none’: Display no messages unless SIGUSR1 or SIGUSR2 are received,
	           or the application exits.
	 • ‘create’: Print information about newly created objects as they’re
	             created.
	 • ‘refs’: Print information about every reference increment and
	           decrement on objects.
	 • ‘backtrace’: Include backtraces with every printed message.
	 • ‘all’: All of the above.

GOBJECT_LIST_FILTER:
	Comma-separated list of object types to print messages about. If this is
	unset, messages will be printed for all object types. Otherwise, they
	will only be printed for the specified camel-case object types.

GOBJECT_PROPAGATE_LD_PRELOAD:
	By default, the LD_PRELOAD environment variable is unset after
	gobject-list finishes loading.

gobject-list's People

Contributors

danni avatar phako avatar matze avatar lyude avatar

Watchers

Peter Wu avatar James Cloos avatar  avatar

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.