This file is indexed.

/usr/share/systemtap/tapset/linux/timestamp.stp is in systemtap-common 2.3-1ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// timestamp tapset
// Copyright (C) 2005-2006 Red Hat Inc.
// Copyright (C) 2006 Intel Corporation.
//
// This file is part of systemtap, and is free software.  You can
// redistribute it and/or modify it under the terms of the GNU General
// Public License (GPL); either version 2, or (at your option) any
// later version.
// <tapsetdescription>
// Each timestamp function returns a value to indicate when a function is executed. These 
//returned values can then be used to indicate when an event occurred, provide an ordering for events, 
//or compute the amount of time elapsed between two time stamps.
// </tapsetdescription>

/**
 * sfunction get_cycles - Processor cycle count
 *
 * Description: This function returns the processor cycle counter value
 * if available, else it returns zero. The cycle counter is free running
 * and unsynchronized on each processor. Thus, the order of events cannot
 * determined by comparing the results of the get_cycles function on 
 * different processors.
 */
function get_cycles:long () %{ /* pure */ /* unprivileged */
  cycles_t c = get_cycles();
  STAP_RETVALUE = (int64_t) c;
%}


/**
 * sfunction jiffies - Kernel jiffies count
 *
 * Description: This function returns the value of the kernel jiffies
 * variable.  This value is incremented periodically by timer interrupts,
 * and may wrap around a 32-bit or 64-bit boundary.  See HZ().
 */
function jiffies:long () %{ /* pure */ /* unprivileged */
  STAP_RETVALUE = (int64_t) jiffies;
%}


/**
 * sfunction HZ - Kernel HZ
 *
 * Description: This function returns the value of the kernel HZ macro,
 * which corresponds to the rate of increase of the jiffies value.
 */
function HZ:long () %{ /* pure */ /* unprivileged */
  STAP_RETVALUE = (int64_t) HZ;
%}