|
484 | 484 | xamarin_bridge_vm_initialize (int propertyCount, const char **propertyKeys, const char **propertyValues) |
485 | 485 | { |
486 | 486 | // TODO: Remove fprintf logs |
487 | | - fprintf (stderr, "xamarin_bridge_vm_initialize: ENTRY propertyCount=%i\n", propertyCount); |
| 487 | + // fprintf (stderr, "xamarin_bridge_vm_initialize: ENTRY propertyCount=%i\n", propertyCount); |
488 | 488 | int rv; |
489 | 489 |
|
490 | 490 | int combinedPropertyCount = 0; |
491 | 491 | const char **combinedPropertyKeys = NULL; |
492 | 492 | const char **combinedPropertyValues = NULL; |
493 | 493 |
|
494 | | - fprintf (stderr, "xamarin_bridge_vm_initialize: calling xamarin_bridge_compute_properties\n"); |
| 494 | + // fprintf (stderr, "xamarin_bridge_vm_initialize: calling xamarin_bridge_compute_properties\n"); |
495 | 495 | xamarin_bridge_compute_properties (propertyCount, propertyKeys, propertyValues, &combinedPropertyCount, &combinedPropertyKeys, &combinedPropertyValues); |
496 | | - fprintf (stderr, "xamarin_bridge_vm_initialize: xamarin_bridge_compute_properties returned, combinedPropertyCount=%i\n", combinedPropertyCount); |
| 496 | + // fprintf (stderr, "xamarin_bridge_vm_initialize: xamarin_bridge_compute_properties returned, combinedPropertyCount=%i\n", combinedPropertyCount); |
497 | 497 |
|
498 | 498 | const char *executablePath = [[[[NSBundle mainBundle] executableURL] path] UTF8String]; |
499 | 499 |
|
500 | | - fprintf (stderr, "xamarin_vm_initialize: executablePath: %s\n", executablePath); |
501 | | - fprintf (stderr, "xamarin_vm_initialize: xamarin_executable_name: %s\n", xamarin_executable_name); |
502 | | - fprintf (stderr, "xamarin_vm_initialize: combinedPropertyCount: %i\n", combinedPropertyCount); |
503 | | - for (int i = 0; i < combinedPropertyCount; i++) { |
504 | | - fprintf (stderr, " Property[%i]: %s = %s\n", i, combinedPropertyKeys[i], combinedPropertyValues[i]); |
505 | | - } |
506 | | - fprintf (stderr, "xamarin_vm_initialize: calling coreclr_initialize\n"); |
507 | | - fprintf (stderr, "xamarin_vm_initialize: calling coreclr_initialize\n"); |
| 500 | + // fprintf (stderr, "xamarin_vm_initialize: executablePath: %s\n", executablePath); |
| 501 | + // fprintf (stderr, "xamarin_vm_initialize: xamarin_executable_name: %s\n", xamarin_executable_name); |
| 502 | + // fprintf (stderr, "xamarin_vm_initialize: combinedPropertyCount: %i\n", combinedPropertyCount); |
| 503 | + // for (int i = 0; i < combinedPropertyCount; i++) { |
| 504 | + // fprintf (stderr, " Property[%i]: %s = %s\n", i, combinedPropertyKeys[i], combinedPropertyValues[i]); |
| 505 | + // } |
| 506 | + // fprintf (stderr, "xamarin_vm_initialize: calling coreclr_initialize\n"); |
| 507 | + // struct timespec ts_init; |
| 508 | + // clock_gettime (CLOCK_MONOTONIC, &ts_init); |
| 509 | + // fprintf (stderr, "[PERF] Before coreclr_initialize at %lld.%09ld\n", (long long)ts_init.tv_sec, ts_init.tv_nsec); |
508 | 510 |
|
509 | 511 | rv = coreclr_initialize ( |
510 | 512 | executablePath, |
|
516 | 518 | &coreclr_domainId |
517 | 519 | ); |
518 | 520 |
|
519 | | - fprintf (stderr, "xamarin_vm_initialize: coreclr_initialize returned rv=%i\n", rv); |
| 521 | + // struct timespec ts_after_init; |
| 522 | + // clock_gettime (CLOCK_MONOTONIC, &ts_after_init); |
| 523 | + // fprintf (stderr, "[PERF] After coreclr_initialize at %lld.%09ld\n", (long long)ts_after_init.tv_sec, ts_after_init.tv_nsec); |
| 524 | + |
| 525 | + // fprintf (stderr, "xamarin_vm_initialize: coreclr_initialize returned rv=%i\n", rv); |
520 | 526 |
|
521 | 527 | for (int i = 0; i < combinedPropertyCount; i++) { |
522 | 528 | free ((void *) combinedPropertyKeys [i]); |
|
525 | 531 | free ((void *) combinedPropertyKeys); |
526 | 532 | free ((void *) combinedPropertyValues); |
527 | 533 |
|
528 | | - fprintf (stderr, "xamarin_vm_initialize (%i, %p, %p): rv: %i (0x%x) domainId: %i handle: %p\n", combinedPropertyCount, combinedPropertyKeys, combinedPropertyValues, rv, rv, coreclr_domainId, coreclr_handle); |
| 534 | + // fprintf (stderr, "xamarin_vm_initialize (%i, %p, %p): rv: %i (0x%x) domainId: %i handle: %p\n", combinedPropertyCount, combinedPropertyKeys, combinedPropertyValues, rv, rv, coreclr_domainId, coreclr_handle); |
529 | 535 |
|
530 | 536 | return rv == 0; |
531 | 537 | } |
|
0 commit comments