Add Open Callsite action in events table for CTF events
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core / src / org / eclipse / linuxtools / tmf / core / ctfadaptor / CtfTmfCallsite.java
1 /*******************************************************************************
2 * Copyright (c) 2013 Ericsson
3 *
4 * All rights reserved. This program and the accompanying materials are made
5 * available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *
9 * Contributors:
10 * Patrick Tasse - Initial API and implementation
11 *******************************************************************************/
12
13 package org.eclipse.linuxtools.tmf.core.ctfadaptor;
14
15 import org.eclipse.linuxtools.ctf.core.event.CTFCallsite;
16
17 /**
18 * Callsite information
19 * @since 2.0
20 */
21 public class CtfTmfCallsite {
22
23 private String eventName;
24 private String fileName;
25 private String functionName;
26 private long lineNumber;
27 private long ip;
28
29 CtfTmfCallsite(CTFCallsite callsite) {
30 eventName = callsite.getEventName();
31 fileName = callsite.getFileName();
32 functionName = callsite.getFunctionName();
33 lineNumber = callsite.getLineNumber();
34 ip = callsite.getIp();
35 }
36
37 /**
38 * @return the event name
39 */
40 public String getEventName() {
41 return eventName;
42 }
43
44 /**
45 * @return the file name
46 */
47 public String getFileName() {
48 return fileName;
49 }
50
51 /**
52 * @return the function name
53 */
54 public String getFunctionName() {
55 return functionName;
56 }
57
58 /**
59 * @return the line number
60 */
61 public long getLineNumber() {
62 return lineNumber;
63 }
64
65 /**
66 * @return the ip
67 */
68 public long getIp() {
69 return ip;
70 }
71
72 @Override
73 public String toString() {
74 return eventName + "@0x" + Long.toHexString(ip) + ": " + //$NON-NLS-1$ //$NON-NLS-2$
75 fileName + ':' + Long.toString(lineNumber) + ' ' + functionName + "()"; //$NON-NLS-1$
76 }
77 }
This page took 0.032857 seconds and 5 git commands to generate.