This will allow getting the number of pages allocated.
Change-Id: I16a0aa00cb4b32f83c964cecc9543d2e0add4e85
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/87180
Reviewed-by: Genevieve Bastien <gbastien+lttng@versatic.net>
Tested-by: Genevieve Bastien <gbastien+lttng@versatic.net>
Reviewed-by: Hudson CI
private static final String SOFT_EXPIRES = "softexpires"; //$NON-NLS-1$
private static final String KMEM_ALLOC = "kmem_mm_page_alloc"; //$NON-NLS-1$
private static final String KMEM_FREE = "kmem_mm_page_free"; //$NON-NLS-1$
+ private static final String ORDER = "order"; //$NON-NLS-1$
/**
* Constructor, to be used by classes extending this one. To get an instance
return SCHED_WAKING;
}
+ /**
+ * @since 2.2
+ */
+ @Override
+ public @NonNull String fieldOrder() {
+ return ORDER;
+ }
+
}
return "vector"; //$NON-NLS-1$
}
+
+ /**
+ * Get the name of the 'order' field from memory page allocation events.
+ *
+ * The 'order' of a page allocation is it's logarithm to the base 2, and the
+ * size of the allocation is 2^order, an integral power-of-2 number of
+ * pages. 'Order' ranges from from 0 to MAX_ORDER-1.
+ *
+ * The smallest - and most frequent - page allocation is 2^0 or 1 page. The
+ * maximum allocation possible is 2^(MAX_ORDER-1) pages. MAX_ORDER is
+ * assigned a default value of 11 - resulting in a maximum allocation of
+ * 2^10 or 1024 pages. However it may be redefined at kernel configuration
+ * time with the option CONFIG_FORCE_MAX_ZONEORDER.
+ *
+ * @return the name of the order field
+ * @since 2.2
+ */
+ default @Nullable String fieldOrder() {
+ return null;
+ }
+
// ------------------------------------------------------------------------
// Network events and fields
// ------------------------------------------------------------------------
private static final String NR_SECTOR="nr_sector";
private static final String RQ_SECTOR= "rq_sector";
private static final String NEXTRQ_SECTOR= "nextrq_sector";
+ private static final String ORDER = "order";
/* Network events and field names */
private static final Collection<String> EVENTS_NETWORK_SEND = Collections.singleton("net_dev_queue");
return TCP_FLAGS_FIELD;
}
+ @Override
+ public @NonNull String fieldOrder() {
+ return ORDER;
+ }
+
// ------------------------------------------------------------------------
// VirtualMachine events : kvm entry/exit events
// ------------------------------------------------------------------------
import java.util.Collection;
+import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
*/
public final class PerfEventLayout implements IKernelAnalysisEventLayout {
- private PerfEventLayout() {}
+ private PerfEventLayout() {
+ }
private static final PerfEventLayout INSTANCE = new PerfEventLayout();
return "sched:sched_pi_setprio"; //$NON-NLS-1$
}
- private static final Collection<String> WAKEUP_EVENTS =
- ImmutableList.of("sched:sched_wakeup", "sched:sched_wakeup_new"); //$NON-NLS-1$ //$NON-NLS-2$
+ private static final Collection<String> WAKEUP_EVENTS = ImmutableList.of("sched:sched_wakeup", "sched:sched_wakeup_new"); //$NON-NLS-1$ //$NON-NLS-2$
@Override
public Collection<String> eventsSchedWakeup() {
@Override
public String eventSchedProcessWakeupNew() {
- return "sched:process_wakeup_new"; //$NON-NLS-1$
+ return "sched:process_wakeup_new"; //$NON-NLS-1$
}
@Override
@Override
public String eventHRTimerStart() {
- return "timer:hrtimer_start"; //$NON-NLS-1$
+ return "timer:hrtimer_start"; //$NON-NLS-1$
}
@Override
return "now"; //$NON-NLS-1$
}
+ @Override
+ public @NonNull String fieldOrder() {
+ return "order"; //$NON-NLS-1$
+ }
+
// ------------------------------------------------------------------------
// I/O events and fields
// ------------------------------------------------------------------------