Bug 1191161 - p3 - Rename / Shorten WrapElementForJNI to WrapForJNI, r=jchen

This commit is contained in:
Mark Capella
2015-08-07 02:09:08 -04:00
parent 5a75b93361
commit 68e521a7af
25 changed files with 169 additions and 170 deletions

View File

@@ -9,7 +9,7 @@ import android.os.SystemClock;
import android.util.Log;
import android.util.SparseArray;
import org.mozilla.gecko.mozglue.generatorannotations.WrapElementForJNI;
import org.mozilla.gecko.annotation.WrapForJNI;
import java.lang.Thread;
import java.util.Set;
@@ -126,7 +126,7 @@ public class GeckoJavaSampler {
}
@WrapElementForJNI(allowMultithread = true, stubName = "GetThreadNameJavaProfilingWrapper")
@WrapForJNI(allowMultithread = true, stubName = "GetThreadNameJavaProfilingWrapper")
public synchronized static String getThreadName(int aThreadId) {
if (aThreadId == 0 && sMainThread != null) {
return sMainThread.getName();
@@ -138,7 +138,7 @@ public class GeckoJavaSampler {
return sSamplingRunnable.getSample(aThreadId, aSampleId);
}
@WrapElementForJNI(allowMultithread = true, stubName = "GetSampleTimeJavaProfiling")
@WrapForJNI(allowMultithread = true, stubName = "GetSampleTimeJavaProfiling")
public synchronized static double getSampleTime(int aThreadId, int aSampleId) {
Sample sample = getSample(aThreadId, aSampleId);
if (sample != null) {
@@ -152,7 +152,7 @@ public class GeckoJavaSampler {
return 0;
}
@WrapElementForJNI(allowMultithread = true, stubName = "GetFrameNameJavaProfilingWrapper")
@WrapForJNI(allowMultithread = true, stubName = "GetFrameNameJavaProfilingWrapper")
public synchronized static String getFrameName(int aThreadId, int aSampleId, int aFrameId) {
Sample sample = getSample(aThreadId, aSampleId);
if (sample != null && aFrameId < sample.mFrames.length) {
@@ -165,7 +165,7 @@ public class GeckoJavaSampler {
return null;
}
@WrapElementForJNI(allowMultithread = true, stubName = "StartJavaProfiling")
@WrapForJNI(allowMultithread = true, stubName = "StartJavaProfiling")
public static void start(int aInterval, int aSamples) {
synchronized (GeckoJavaSampler.class) {
if (sSamplingRunnable != null) {
@@ -177,21 +177,21 @@ public class GeckoJavaSampler {
}
}
@WrapElementForJNI(allowMultithread = true, stubName = "PauseJavaProfiling")
@WrapForJNI(allowMultithread = true, stubName = "PauseJavaProfiling")
public static void pause() {
synchronized (GeckoJavaSampler.class) {
sSamplingRunnable.mPauseSampler = true;
}
}
@WrapElementForJNI(allowMultithread = true, stubName = "UnpauseJavaProfiling")
@WrapForJNI(allowMultithread = true, stubName = "UnpauseJavaProfiling")
public static void unpause() {
synchronized (GeckoJavaSampler.class) {
sSamplingRunnable.mPauseSampler = false;
}
}
@WrapElementForJNI(allowMultithread = true, stubName = "StopJavaProfiling")
@WrapForJNI(allowMultithread = true, stubName = "StopJavaProfiling")
public static void stop() {
synchronized (GeckoJavaSampler.class) {
if (sSamplingThread == null) {