1 /*******************************************************************************
2 * Copyright (c) 2014, 2015 Ericsson
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
10 * Alexandre Montplaisir - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.tracecompass
.tmf
.core
.event
.aspect
;
15 import org
.eclipse
.jdt
.annotation
.Nullable
;
16 import org
.eclipse
.tracecompass
.tmf
.core
.event
.ITmfEvent
;
19 * Event aspect representing the CPU of a trace event. Trace types that do have
20 * the notion of CPU can use this to expose it in their traces.
22 * TODO Move to an eventualy kernel-trace-specific plugin.
24 * @author Alexandre Montplaisir
26 public abstract class TmfCpuAspect
implements ITmfEventAspect
{
29 public final String
getName() {
30 return Messages
.getMessage(Messages
.AspectName_CPU
);
34 public final String
getHelpText() {
35 return Messages
.getMessage(Messages
.AspectHelpText_CPU
);
39 * Returns the CPU number of the CPU on which this event was executed or
40 * {@code null} if the CPU is not available for an event.
43 public abstract @Nullable Integer
resolve(ITmfEvent event
);
46 public boolean equals(@Nullable Object other
) {
48 * Consider all sub-instance of this type "equal", so that they get
49 * merged in a single CPU column/aspect.
51 if (other
instanceof TmfCpuAspect
) {
58 public int hashCode() {
59 return getName().hashCode();
This page took 0.032197 seconds and 5 git commands to generate.