]> sourceware.org Git - systemtap.git/blame - tapset/pn.stp
Correct year for systemtap beginners guide.
[systemtap.git] / tapset / pn.stp
CommitLineData
d48df0cf
JS
1// probe-name tapset
2// Copyright (C) 2010 Red Hat Inc.
3//
4// This file is part of systemtap, and is free software. You can
5// redistribute it and/or modify it under the terms of the GNU General
6// Public License (GPL); either version 2, or (at your option) any
7// later version.
8
9
10/**
86518ac5 11 * sfunction pn - Returns the active probe name
d48df0cf
JS
12 *
13 * Description: This function returns the script-level probe point
14 * associated with a currently running probe handler, including
15 * wild-card expansion effects. Context: The current probe point.
16 */
17function pn:string ()
18%{ /* pure */ /* unprivileged */
19#ifndef STP_NEED_PROBE_NAME
20#define STP_NEED_PROBE_NAME 1
21#endif
22 const char* name = CONTEXT->probe_name ?: CONTEXT->probe_point;
23 strlcpy (THIS->__retvalue, name, MAXSTRINGLEN);
24%}
This page took 0.045903 seconds and 5 git commands to generate.