Home
last modified time | relevance | path

Searched refs:ctx (Results 1 – 25 of 28) sorted by relevance

12

/dalvik/vm/hprof/
DHprof.c38 hprof_context_t *ctx; in hprofStartup() local
40 ctx = malloc(sizeof(*ctx)); in hprofStartup()
41 if (ctx != NULL) { in hprofStartup()
52 free(ctx); in hprofStartup()
59 free(ctx); in hprofStartup()
76 hprofContextInit(ctx, strdup(outputFileName), fp, false); in hprofStartup()
81 return ctx; in hprofStartup()
118 hprofShutdown(hprof_context_t *ctx) in hprofShutdown() argument
120 FILE *tempFp = ctx->fp; in hprofShutdown()
124 hprofFlushCurrentRecord(ctx); in hprofShutdown()
[all …]
DHprof.h144 int hprofDumpStrings(hprof_context_t *ctx);
156 int hprofDumpClasses(hprof_context_t *ctx);
166 int hprofStartHeapDump(hprof_context_t *ctx);
167 int hprofFinishHeapDump(hprof_context_t *ctx);
169 int hprofSetGcScanState(hprof_context_t *ctx,
171 int hprofMarkRootObject(hprof_context_t *ctx,
174 int hprofDumpHeapObject(hprof_context_t *ctx, const Object *obj);
180 void hprofContextInit(hprof_context_t *ctx, char *fileName, FILE *fp,
184 int hprofFlushCurrentRecord(hprof_context_t *ctx);
185 int hprofStartNewRecord(hprof_context_t *ctx, u1 tag, u4 time);
[all …]
DHprofHeap.c34 hprofStartHeapDump(hprof_context_t *ctx) in hprofStartHeapDump() argument
36 UNUSED_PARAMETER(ctx); in hprofStartHeapDump()
38 ctx->objectsInSegment = OBJECTS_PER_SEGMENT; in hprofStartHeapDump()
39 ctx->currentHeap = HPROF_HEAP_DEFAULT; in hprofStartHeapDump()
44 hprofFinishHeapDump(hprof_context_t *ctx) in hprofFinishHeapDump() argument
46 return hprofStartNewRecord(ctx, HPROF_TAG_HEAP_DUMP_END, HPROF_TIME); in hprofFinishHeapDump()
50 hprofSetGcScanState(hprof_context_t *ctx, in hprofSetGcScanState() argument
55 ctx->gcScanState = state; in hprofSetGcScanState()
56 ctx->gcThreadSerialNumber = threadSerialNumber; in hprofSetGcScanState()
119 hprofMarkRootObject(hprof_context_t *ctx, const Object *obj, jobject jniObj) in hprofMarkRootObject() argument
[all …]
DHprofOutput.c58 hprofContextInit(hprof_context_t *ctx, char *fileName, FILE *fp, in hprofContextInit() argument
61 memset(ctx, 0, sizeof (*ctx)); in hprofContextInit()
62 ctx->fileName = fileName; in hprofContextInit()
63 ctx->fp = fp; in hprofContextInit()
65 ctx->curRec.allocLen = 128; in hprofContextInit()
66 ctx->curRec.body = malloc(ctx->curRec.allocLen); in hprofContextInit()
135 hprofFlushCurrentRecord(hprof_context_t *ctx) in hprofFlushCurrentRecord() argument
137 return hprofFlushRecord(&ctx->curRec, ctx->fp); in hprofFlushCurrentRecord()
141 hprofStartNewRecord(hprof_context_t *ctx, u1 tag, u4 time) in hprofStartNewRecord() argument
143 hprof_record_t *rec = &ctx->curRec; in hprofStartNewRecord()
[all …]
DHprofStack.h33 int hprofDumpStacks(hprof_context_t *ctx);
40 int hprofDumpStackFrames(hprof_context_t *ctx);
DHprofString.c81 hprofDumpStrings(hprof_context_t *ctx) in hprofDumpStrings() argument
84 hprof_record_t *rec = &ctx->curRec; in hprofDumpStrings()
93 err = hprofStartNewRecord(ctx, HPROF_TAG_STRING, HPROF_TIME); in hprofDumpStrings()
DHprofClass.c183 hprofDumpClasses(hprof_context_t *ctx) in hprofDumpClasses() argument
186 hprof_record_t *rec = &ctx->curRec; in hprofDumpClasses()
195 err = hprofStartNewRecord(ctx, HPROF_TAG_LOAD_CLASS, HPROF_TIME); in hprofDumpClasses()
DHprofStackFrame.c178 hprofDumpStackFrames(hprof_context_t *ctx) in hprofDumpStackFrames() argument
181 hprof_record_t *rec = &ctx->curRec; in hprofDumpStackFrames()
196 hprofStartNewRecord(ctx, HPROF_TAG_STACK_FRAME, HPROF_TIME); in hprofDumpStackFrames()
DHprofStack.c158 hprofDumpStacks(hprof_context_t *ctx) in hprofDumpStacks() argument
161 hprof_record_t *rec = &ctx->curRec; in hprofDumpStacks()
173 hprofStartNewRecord(ctx, HPROF_TAG_STACK_TRACE, HPROF_TIME); in hprofDumpStacks()
/dalvik/vm/alloc/
DDdmHeap.c191 flush_hpsg_chunk(HeapChunkContext *ctx) in flush_hpsg_chunk() argument
195 assert(ctx->buf <= ctx->pieceLenField && in flush_hpsg_chunk()
196 ctx->pieceLenField <= ctx->p); in flush_hpsg_chunk()
197 set4BE(ctx->pieceLenField, ctx->totalAllocationUnits); in flush_hpsg_chunk()
201 dvmDbgDdmSendChunk(ctx->type, ctx->p - ctx->buf, ctx->buf); in flush_hpsg_chunk()
205 ctx->p = ctx->buf; in flush_hpsg_chunk()
206 ctx->totalAllocationUnits = 0; in flush_hpsg_chunk()
207 ctx->needHeader = true; in flush_hpsg_chunk()
208 ctx->pieceLenField = NULL; in flush_hpsg_chunk()
215 HeapChunkContext *ctx = (HeapChunkContext *)arg; in heap_chunk_callback() local
[all …]
DHeapDebug.c344 dump_context(const HeapDumpContext *ctx)
346 fprintf(ctx->fp, "0x%08x %12.12zd %s\n", (uintptr_t)ctx->chunkStart,
347 ctx->chunkLen, ctx->chunkFree ? "FREE" : "USED");
354 HeapDumpContext *ctx = (HeapDumpContext *)arg;
357 if (chunkFree != ctx->chunkFree ||
358 ((char *)ctx->chunkStart + ctx->chunkLen) != chunkptr)
364 if (ctx->chunkStart != NULL) {
366 dump_context(ctx);
368 ctx->chunkStart = (void *)chunkptr;
369 ctx->chunkLen = chunklen;
[all …]
DMarkSweep.c85 static inline long isMarked(const DvmHeapChunk *hc, const GcMarkContext *ctx)
87 static inline long isMarked(const DvmHeapChunk *hc, const GcMarkContext *ctx) in isMarked() argument
89 return dvmHeapBitmapIsObjectBitSetInList(ctx->bitmaps, ctx->numBitmaps, hc); in isMarked()
180 static long setAndReturnMarkBit(GcMarkContext *ctx, const DvmHeapChunk *hc)
183 setAndReturnMarkBit(GcMarkContext *ctx, const DvmHeapChunk *hc) in setAndReturnMarkBit() argument
185 return dvmHeapBitmapSetAndReturnObjectBitInList(ctx->bitmaps, in setAndReturnMarkBit()
186 ctx->numBitmaps, hc); in setAndReturnMarkBit()
189 static void _markObjectNonNullCommon(const Object *obj, GcMarkContext *ctx,
193 _markObjectNonNullCommon(const Object *obj, GcMarkContext *ctx, in _markObjectNonNullCommon() argument
207 if (!setAndReturnMarkBit(ctx, hc)) { in _markObjectNonNullCommon()
[all …]
/dalvik/libcore/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/
DNativeCrypto.java69 public static native void EVP_free(int ctx); in EVP_free() argument
73 public static native void EVP_DigestInit(int ctx, String algorithm); in EVP_DigestInit() argument
75 public static native void EVP_DigestUpdate(int ctx, byte[] buffer, int offset, int length); in EVP_DigestUpdate() argument
77 public static native int EVP_DigestFinal(int ctx, byte[] hash, int offset); in EVP_DigestFinal() argument
79 public static native int EVP_DigestSize(int ctx); in EVP_DigestSize() argument
81 public static native int EVP_DigestBlockSize(int ctx); in EVP_DigestBlockSize() argument
85 public static native void EVP_VerifyInit(int ctx, String algorithm); in EVP_VerifyInit() argument
87 public static native void EVP_VerifyUpdate(int ctx, byte[] buffer, int offset, int length); in EVP_VerifyUpdate() argument
89 …public static native int EVP_VerifyFinal(int ctx, byte[] signature, int offset, int length, int ke… in EVP_VerifyFinal() argument
DOpenSSLMessageDigest.java36 private int ctx; field in OpenSSLMessageDigest
73 ctx = NativeCrypto.EVP_new(); in OpenSSLMessageDigest()
75 NativeCrypto.EVP_DigestInit(ctx, algorithm.replace("-", "").toLowerCase()); in OpenSSLMessageDigest()
82 int i = NativeCrypto.EVP_DigestFinal(ctx, out, outOff); in doFinal()
92 return NativeCrypto.EVP_DigestSize(ctx); in getDigestSize()
96 return NativeCrypto.EVP_DigestBlockSize(ctx); in getByteLength()
100 NativeCrypto.EVP_DigestInit(ctx, algorithm.replace("-", "").toLowerCase()); in reset()
105 NativeCrypto.EVP_DigestUpdate(ctx, singleByte, 0, 1); in update()
109 NativeCrypto.EVP_DigestUpdate(ctx, in, inOff, len); in update()
115 NativeCrypto.EVP_free(ctx); in finalize()
DOpenSSLMessageDigestJDK.java14 private int ctx; field in OpenSSLMessageDigestJDK
51 ctx = NativeCrypto.EVP_new(); in OpenSSLMessageDigestJDK()
53 NativeCrypto.EVP_DigestInit(ctx, getAlgorithm().replace("-", "").toLowerCase()); in OpenSSLMessageDigestJDK()
61 byte[] result = new byte[NativeCrypto.EVP_DigestSize(ctx)]; in engineDigest()
62 NativeCrypto.EVP_DigestFinal(ctx, result, 0); in engineDigest()
69 NativeCrypto.EVP_DigestInit(ctx, getAlgorithm().replace("-", "").toLowerCase()); in engineReset()
74 return NativeCrypto.EVP_DigestSize(ctx); in engineGetDigestLength()
85 NativeCrypto.EVP_DigestUpdate(ctx, input, offset, len); in engineUpdate()
91 NativeCrypto.EVP_free(ctx); in finalize()
DOpenSSLSignature.java38 private int ctx; field in OpenSSLSignature
109 ctx = NativeCrypto.EVP_new(); in OpenSSLSignature()
123 NativeCrypto.EVP_VerifyUpdate(ctx, input, offset, len); in engineUpdate()
166 NativeCrypto.EVP_VerifyInit(ctx, evpAlgorithm); in engineInitVerify()
191 int result = NativeCrypto.EVP_VerifyFinal(ctx, sigBytes, 0, sigBytes.length, handle); in engineVerify()
211 if (ctx != 0) { in finalize()
212 NativeCrypto.EVP_free(ctx); in finalize()
/dalvik/libcore/x-net/src/main/native/
Dorg_apache_harmony_xnet_provider_jsse_NativeCrypto.cpp242 static void NativeCrypto_EVP_free(JNIEnv* env, jclass clazz, EVP_MD_CTX* ctx) { in NativeCrypto_EVP_free() argument
245 if (ctx != NULL) { in NativeCrypto_EVP_free()
246 EVP_MD_CTX_destroy(ctx); in NativeCrypto_EVP_free()
253 static jint NativeCrypto_EVP_DigestFinal(JNIEnv* env, jclass clazz, EVP_MD_CTX* ctx, jbyteArray has… in NativeCrypto_EVP_DigestFinal() argument
256 if (ctx == NULL || hash == NULL) { in NativeCrypto_EVP_DigestFinal()
264 EVP_DigestFinal(ctx, (unsigned char*) (hashBytes + offset), (unsigned int*)&result); in NativeCrypto_EVP_DigestFinal()
275 static void NativeCrypto_EVP_DigestInit(JNIEnv* env, jclass clazz, EVP_MD_CTX* ctx, jstring algorit… in NativeCrypto_EVP_DigestInit() argument
278 if (ctx == NULL || algorithm == NULL) { in NativeCrypto_EVP_DigestInit()
293 EVP_DigestInit(ctx, digest); in NativeCrypto_EVP_DigestInit()
301 static jint NativeCrypto_EVP_DigestSize(JNIEnv* env, jclass clazz, EVP_MD_CTX* ctx) { in NativeCrypto_EVP_DigestSize() argument
[all …]
Dorg_apache_harmony_xnet_provider_jsse_OpenSSLServerSocketImpl.cpp158 SSL_CTX* ctx = (SSL_CTX*)env->GetIntField(object, field_ssl_ctx); in org_apache_harmony_xnet_provider_jsse_OpenSSLServerSocketImpl_setenabledprotocols() local
159 SSL_CTX_set_options((SSL_CTX*)ctx, SSL_OP_ALL|SSL_OP_NO_SSLv2|(long)protocol); in org_apache_harmony_xnet_provider_jsse_OpenSSLServerSocketImpl_setenabledprotocols()
170 SSL_CTX* ctx; in org_apache_harmony_xnet_provider_jsse_OpenSSLServerSocketImpl_getsupportedciphersuites() local
177 ctx = SSL_CTX_new(SSLv23_server_method()); in org_apache_harmony_xnet_provider_jsse_OpenSSLServerSocketImpl_getsupportedciphersuites()
178 ssl = SSL_new(ctx); in org_apache_harmony_xnet_provider_jsse_OpenSSLServerSocketImpl_getsupportedciphersuites()
211 SSL_CTX* ctx; in org_apache_harmony_xnet_provider_jsse_OpenSSLServerSocketImpl_getenabledciphersuites() local
217 ctx = (SSL_CTX*)env->GetIntField(object, field_ssl_ctx); in org_apache_harmony_xnet_provider_jsse_OpenSSLServerSocketImpl_getenabledciphersuites()
218 ssl = SSL_new(ctx); in org_apache_harmony_xnet_provider_jsse_OpenSSLServerSocketImpl_getenabledciphersuites()
245 SSL_CTX* ctx; in org_apache_harmony_xnet_provider_jsse_OpenSSLServerSocketImpl_setenabledciphersuites() local
249 ctx = (SSL_CTX*)env->GetIntField(object, field_ssl_ctx); in org_apache_harmony_xnet_provider_jsse_OpenSSLServerSocketImpl_setenabledciphersuites()
[all …]
Dorg_apache_harmony_xnet_provider_jsse_OpenSSLSocketImpl.cpp486 SSL_CTX *ctx = (SSL_CTX *)env->GetIntField(object, field_ssl_ctx); in free_ssl_ctx() local
488 if (ctx != NULL) { in free_ssl_ctx()
489 SSL_CTX_free(ctx); in free_ssl_ctx()
941 EVP_MD_CTX ctx; in rsaVerify() local
943 EVP_MD_CTX_init(&ctx); in rsaVerify()
944 if (EVP_VerifyInit_ex(&ctx, type, NULL) == 0) { in rsaVerify()
948 EVP_VerifyUpdate(&ctx, msg, msgLen); in rsaVerify()
949 result = EVP_VerifyFinal(&ctx, sig, sigLen, key); in rsaVerify()
950 EVP_MD_CTX_cleanup(&ctx); in rsaVerify()
1079 jint ctx, jobject socketObject, jboolean client_mode, jint session) in org_apache_harmony_xnet_provider_jsse_OpenSSLSocketImpl_connect() argument
[all …]
/dalvik/libcore/openssl/src/main/java/org/openssl/
DNativeBN.java138 public static native boolean BN_gcd(int r, int a, int b, int ctx); in BN_gcd() argument
141 public static native boolean BN_mul(int r, int a, int b, int ctx); in BN_mul() argument
144 public static native boolean BN_exp(int r, int a, int p, int ctx); in BN_exp() argument
151 public static native boolean BN_div(int dv, int rem, int m, int d, int ctx); in BN_div() argument
154 public static native boolean BN_nnmod(int r, int a, int m, int ctx); in BN_nnmod() argument
157 public static native boolean BN_mod_exp(int r, int a, int p, int m, int ctx); in BN_mod_exp() argument
165 public static native boolean BN_mod_inverse(int ret, int a, int n, int ctx); in BN_mod_inverse() argument
175 public static native boolean BN_is_prime_ex(int p, int nchecks, int ctx, int cb); in BN_is_prime_ex() argument
/dalvik/libcore/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/
DMockSecurityManager.java53 public void checkPermission(Permission perm, Object ctx) { in checkPermission() argument
58 dflt.checkPermission(perm, ctx); in checkPermission()
DFilePreferencesImplTest.java320 public void checkPermission(Permission perm, Object ctx) { in checkPermission() argument
325 dflt.checkPermission(perm, ctx); in checkPermission()
/dalvik/dx/src/com/android/dx/util/
DExceptionWithContext.java83 String ctx = ((ExceptionWithContext) cause).context.toString(); in ExceptionWithContext() local
84 context = new StringBuffer(ctx.length() + 200); in ExceptionWithContext()
85 context.append(ctx); in ExceptionWithContext()
/dalvik/libcore/openssl/src/main/native/
DBNInterface.c738 …c jboolean NativeBN_BN_gcd(JNIEnv* env, jclass cls, BIGNUM* r, BIGNUM* a, BIGNUM* b, BN_CTX* ctx) { in NativeBN_BN_gcd() argument
740 return BN_gcd(r, a, b, ctx); in NativeBN_BN_gcd()
746 …c jboolean NativeBN_BN_mul(JNIEnv* env, jclass cls, BIGNUM* r, BIGNUM* a, BIGNUM* b, BN_CTX* ctx) { in NativeBN_BN_mul() argument
748 return BN_mul(r, a, b, ctx); in NativeBN_BN_mul()
754 …c jboolean NativeBN_BN_exp(JNIEnv* env, jclass cls, BIGNUM* r, BIGNUM* a, BIGNUM* p, BN_CTX* ctx) { in NativeBN_BN_exp() argument
756 return BN_exp(r, a, p, ctx); in NativeBN_BN_exp()
762 …iveBN_BN_div(JNIEnv* env, jclass cls, BIGNUM* dv, BIGNUM* rem, BIGNUM* m, BIGNUM* d, BN_CTX* ctx) { in NativeBN_BN_div() argument
764 return BN_div(dv, rem, m, d, ctx); in NativeBN_BN_div()
770 …jboolean NativeBN_BN_nnmod(JNIEnv* env, jclass cls, BIGNUM* r, BIGNUM* a, BIGNUM* m, BN_CTX* ctx) { in NativeBN_BN_nnmod() argument
772 return BN_nnmod(r, a, m, ctx); in NativeBN_BN_nnmod()
[all …]
/dalvik/libcore/luni/src/test/java/org/apache/harmony/luni/tests/internal/net/www/protocol/https/
DHttpsURLConnectionTest.java172 SSLContext ctx = getContext(); in testHttpsConnection() local
173 ServerSocket ss = ctx.getServerSocketFactory() in testHttpsConnection()
232 SSLContext ctx = getContext(); in testHttpsConnection_Not_Found_Response() local
233 ServerSocket ss = ctx.getServerSocketFactory() in testHttpsConnection_Not_Found_Response()
277 SSLContext ctx = getContext(); in testSetDefaultSSLSocketFactory() local
278 SSLServerSocket ss = (SSLServerSocket) ctx.getServerSocketFactory() in testSetDefaultSSLSocketFactory()
281 SSLSocketFactory socketFactory = (SSLSocketFactory) ctx in testSetDefaultSSLSocketFactory()
334 SSLContext ctx = getContext(); in testSetSSLSocketFactory() local
335 SSLServerSocket ss = (SSLServerSocket) ctx.getServerSocketFactory() in testSetSSLSocketFactory()
347 SSLSocketFactory socketFactory = (SSLSocketFactory) ctx in testSetSSLSocketFactory()
[all …]

12