This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC] perf-cache command interface design


Hello,

Here, I've tried to describe my idea of perf-cache subcommand interface.
It is just a design review, not implemented yet :)
Please give me your comments/ideas!

Command-line Synopsis
=====================

Current "perf buildid-cache [options]" are directly mapped to
"perf cache --buildid [options]".

And adding --sdt for managing SDT caches as below.

  Add or update SDT events in <FILES>
    perf cache --sdt --add|--update <FILES>

  Remove all SDT events for <FILES>
    perf cache --sdt --remove <FILES>

  List all SDT events
    perf cache --sdt --list

And --probes for managing probe-caches as below.

  Add new probe-cache entries for kernel, <PATH> or <MOD>.
    perf cache --probe [--exec <PATH>|--module <MOD>] --add <SPEC>

  Delete existing probe-cache entries for kernel, <PATH> or/and <BUILDID>.
    perf cache --probe --del [<GROUP>:]<EVENT>[@<PATH>][#<BUILDID>]

  Or remove all entires for given FILES
    perf cache --probe --remove <FILES>

  List the probe caches(including SDT) for kernel, <PATH>, or/and <BUILDID>.
    perf cache --probe --list [@<PATH>][#<BUILDID>]

  Query the probe definitions.
    perf cache --probe --query [<GROUP>:]<EVENT>[@<PATH>][#<BUILDID>]

Note that --probes also can be used for managing SDT events, which has % prefix
e.g.
  Add all SDT events for <PATH>
    perf cache --probe --exec <PATH> --add '%*:*'

  Remove some SDT events for <PATH>
    perf cache --probe --del '%some:events@<PATH>'

  Or remove all SDT events for <BUILDID>
    perf cache --probe --del '%*:*#<BUILDID>'


File Format
===========
All the cache files are placed under ~/.debug/ by default.
The paths of buildid cache of binary/symbols are not changed.

The SDT/probe caches are placed under the ~/.debug/.probes/path/to/bin/bu/ildid
and that is linked to ~/.debug/.probes/.buildid/bu/ildid
# To avoid conflict with files under /probes/*, I picked up .probes/.

This SDT/probe caches contain probe-definitions as following format.
----
#buildid:BUILDID
#path:PATH
p:%PROVIDER/EVENT PATH:OFFSET [ARGS]
p:PROBE/EVENT _text+OFFSET [ARGS]
----

Normal probes and SDT cache entries can be mixed in a cache file, we'll
load all the entries and filter by % prefixes.


Thank you,

-- 
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Research Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]