~ubuntu-branches/ubuntu/wily/ust/wily-proposed

« back to all changes in this revision

Viewing changes to liblttng-ust-jul/org/lttng/ust/jul/LTTngUst.java

  • Committer: Package Import Robot
  • Author(s): Artur Rona
  • Date: 2015-06-24 14:18:03 UTC
  • mfrom: (11.2.11 sid)
  • Revision ID: package-import@ubuntu.com-20150624141803-zfj6xzpr7dlxiysg
Tags: 2.6.2-1ubuntu1
* Merge from Debian unstable. (LP: #1468345) Remaining changes:
  - debian/control, debian/patches/use-python3.patch:
    + Switch to use python3. (Closes: #789790)
* Drop following changes, fixed in Debian / upstream:
  - debian/patches/0001-Add-aarch64-host-cpu-in-configure.ac.patch:
    + Add arm64 host_cpu stanzas in configure.ac
  - debian/liblttng-ust0.symbols:
    + Update symbols file.
  - debian/control:
    + Enable builds on arm64 and ppc64el.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/**
2
 
 * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3
 
 * Copyright (C) 2012 Alexandre Montplaisir <alexandre.montplaisir@polymtl.ca>
4
 
 *
5
 
 * This library is free software; you can redistribute it and/or
6
 
 * modify it under the terms of the GNU Lesser General Public
7
 
 * License as published by the Free Software Foundation; only
8
 
 * version 2.1 of the License.
9
 
 *
10
 
 * This library is distributed in the hope that it will be useful,
11
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
 
 * Lesser General Public License for more details.
14
 
 *
15
 
 * You should have received a copy of the GNU Lesser General Public
16
 
 * License along with this library; if not, write to the Free Software
17
 
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
 
 */
19
 
 
20
 
package org.lttng.ust.jul;
21
 
 
22
 
/**
23
 
 * This class implements the the Java side of the LTTng-UST Java interface.
24
 
 *
25
 
 * First, make sure you have installed "liblttng-ust-java.so" where the linker
26
 
 * can find it. You can then call LTTngUst.init() from your Java program to
27
 
 * connect the methods exposed here to the native library.
28
 
 *
29
 
 * Because of limitations in the probe declaration, all trace events generated
30
 
 * by this library will have "lttng_ust_java" for domain, and "<type>_event" for
31
 
 * event name in the CTF trace files. The "name" parameter will instead appear
32
 
 * as the first element of the event's payload.
33
 
 *
34
 
 * @author Mathieu Desnoyers
35
 
 * @author Alexandre Montplaisir
36
 
 * @author David Goulet
37
 
 *
38
 
 */
39
 
public abstract class LTTngUst {
40
 
        /**
41
 
         * Initialize the UST tracer. This should always be called first, before any
42
 
         * tracepoint* method.
43
 
         */
44
 
        public static void init() {
45
 
                System.loadLibrary("lttng-ust-jul-jni"); //$NON-NLS-1$
46
 
        }
47
 
 
48
 
        /**
49
 
         * Insert a tracepoint for JUL event.
50
 
         *
51
 
         * @param msg
52
 
         *            Raw message provided by the JUL API.
53
 
         * @param logger_name
54
 
         *            Logger name that trigger this event.
55
 
         * @param class_name
56
 
         *            Name of the class that (allegedly) issued the logging request.
57
 
         * @param method_name
58
 
         *            Name of the method that (allegedly) issued the logging request.
59
 
         * @param millis
60
 
         *            Event time in milliseconds since 1970.
61
 
         * @param log_level
62
 
         *            Log level of the event from JUL.
63
 
         * @param thread_id
64
 
         *            Identifier for the thread where the message originated.
65
 
         */
66
 
 
67
 
        /* Use for a user session daemon. */
68
 
        public static native void tracepointU(String msg, String logger_name, String class_name,
69
 
                        String method_name, long millis, int log_level, int thread_id);
70
 
 
71
 
        /* Use for a root session daemon. */
72
 
        public static native void tracepointS(String msg, String logger_name, String class_name,
73
 
                        String method_name, long millis, int log_level, int thread_id);
74
 
}