Skip to content

Commit

Permalink
Fix issues in merging
Browse files Browse the repository at this point in the history
  • Loading branch information
qinsoon committed May 9, 2023
1 parent e586637 commit 91dc055
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 58 deletions.
2 changes: 0 additions & 2 deletions src/gc-debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -1257,8 +1257,6 @@ NOINLINE void gc_mark_loop_unwind(jl_ptls_t ptls, jl_gc_markqueue_t *mq, int off
jl_set_safe_restore(old_buf);
}

extern int gc_logging_enabled;

void _report_gc_finished(uint64_t pause, uint64_t freed, int full, int recollect) JL_NOTSAFEPOINT {
if (!gc_logging_enabled) {
return;
Expand Down
24 changes: 0 additions & 24 deletions src/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,7 @@ JL_DLLEXPORT void jl_gc_array_ptr_copy(jl_array_t *dest, void **dest_p,
#define GC_PERM_POOL_SIZE (2 * 1024 * 1024)
// 20k limit for pool allocation. At most 1% fragmentation
#define GC_PERM_POOL_LIMIT (20 * 1024)
<<<<<<< HEAD
=======

>>>>>>> master
static uintptr_t gc_perm_pool = 0;
static uintptr_t gc_perm_end = 0;

Expand Down Expand Up @@ -3309,27 +3306,6 @@ void disable_collection(void)
{
}

// Generated code will directly call this for write barrier. Used for debugging.
JL_DLLEXPORT void jl_gc_wb1_noinline(const void* parent) JL_NOTSAFEPOINT
{
jl_gc_wb_back(parent);
}

JL_DLLEXPORT void jl_gc_wb2_noinline(const void* parent, const void* ptr) JL_NOTSAFEPOINT
{
jl_gc_wb(parent, ptr);
}

void jl_gc_notify_image_load(const char* img_data, size_t len)
{
// Do nothing
}

void jl_gc_notify_image_alloc(char* img_data, size_t len)
{
// Do nothing
}

#ifdef __cplusplus
}
#endif
Expand Down
2 changes: 0 additions & 2 deletions src/jl_exported_funcs.inc
Original file line number Diff line number Diff line change
Expand Up @@ -525,8 +525,6 @@
XX(jl_wakeup_thread) \
XX(jl_write_compiler_output) \
XX(jl_yield) \
XX(jl_gc_wb1_noinline) \
XX(jl_gc_wb2_noinline)

#define JL_RUNTIME_EXPORTED_FUNCS_WIN(XX) \
XX(jl_setjmp) \
Expand Down
6 changes: 0 additions & 6 deletions src/julia.h
Original file line number Diff line number Diff line change
Expand Up @@ -930,9 +930,6 @@ JL_DLLEXPORT void jl_clear_malloc_data(void);
JL_DLLEXPORT void jl_gc_queue_root(const jl_value_t *root) JL_NOTSAFEPOINT;
JL_DLLEXPORT void jl_gc_queue_multiroot(const jl_value_t *root, const jl_value_t *stored) JL_NOTSAFEPOINT;

JL_DLLEXPORT void jl_gc_wb1_noinline(const void* parent) JL_NOTSAFEPOINT;
JL_DLLEXPORT void jl_gc_wb2_noinline(const void* parent, const void* ptr) JL_NOTSAFEPOINT;

#ifndef MMTK_GC
STATIC_INLINE void jl_gc_wb(const void *parent, const void *ptr) JL_NOTSAFEPOINT
{
Expand Down Expand Up @@ -968,8 +965,6 @@ STATIC_INLINE void jl_gc_multi_wb(const void *parent, const jl_value_t *ptr) JL_
// TODO: We should inline fastpath in the following functions, and only call slowpath.
STATIC_INLINE void mmtk_gc_wb_full(const void *parent, const void *ptr) JL_NOTSAFEPOINT;

STATIC_INLINE void mmtk_gc_wb(const void* parent, const void* ptr) JL_NOTSAFEPOINT;

STATIC_INLINE void jl_gc_wb(const void *parent, const void *ptr) JL_NOTSAFEPOINT
{
mmtk_gc_wb_full(parent, ptr);
Expand All @@ -984,7 +979,6 @@ STATIC_INLINE void jl_gc_multi_wb(const void *parent, const jl_value_t *ptr) JL_
{
mmtk_gc_wb_full(parent, (void*)0);
}

#endif // MMTK_GC

JL_DLLEXPORT void *jl_gc_managed_malloc(size_t sz);
Expand Down
1 change: 1 addition & 0 deletions src/julia_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,7 @@ STATIC_INLINE void jl_gc_wb_buf(void *parent, void *bufptr, size_t minsz) JL_NOT
gc_setmark_buf(ct->ptls, bufptr, 3, minsz);
}
}

#else // MMTK_GC

// TODO: We should inline fastpath in the following functions, and only call slowpath.
Expand Down
2 changes: 0 additions & 2 deletions src/llvm-final-gc-lowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ struct FinalLowerGC: private JuliaPassContext {
Function *writeBarrier2Func;
#endif
Instruction *pgcstack;
Function *writeBarrier1Func;
Function *writeBarrier2Func;

// Lowers a `julia.new_gc_frame` intrinsic.
Value *lowerNewGCFrame(CallInst *target, Function &F);
Expand Down
22 changes: 0 additions & 22 deletions src/llvm-pass-helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,10 @@ namespace jl_intrinsics {
static const char *POP_GC_FRAME_NAME = "julia.pop_gc_frame";
static const char *QUEUE_GC_ROOT_NAME = "julia.queue_gc_root";
static const char *SAFEPOINT_NAME = "julia.safepoint";
<<<<<<< HEAD
static const char *WRITE_BARRIER_1_NAME = "julia.write_barrier1_noinline";
static const char *WRITE_BARRIER_2_NAME = "julia.write_barrier2_noinline";
=======
#ifdef MMTK_GC
static const char *WRITE_BARRIER_1_NAME = "julia.write_barrier1_noinline";
static const char *WRITE_BARRIER_2_NAME = "julia.write_barrier2_noinline";
#endif
>>>>>>> master

// Annotates a function with attributes suitable for GC allocation
// functions. Specifically, the return value is marked noalias and nonnull.
Expand Down Expand Up @@ -233,10 +228,7 @@ namespace jl_intrinsics {
return intrinsic;
});

<<<<<<< HEAD
=======
#ifdef MMTK_GC
>>>>>>> master
const IntrinsicDescription writeBarrier1(
WRITE_BARRIER_1_NAME,
[](const JuliaPassContext &context) {
Expand All @@ -263,25 +255,17 @@ namespace jl_intrinsics {
intrinsic->addFnAttr(Attribute::InaccessibleMemOrArgMemOnly);
return intrinsic;
});
<<<<<<< HEAD
=======
#endif
>>>>>>> master
}

namespace jl_well_known {
static const char *GC_BIG_ALLOC_NAME = XSTR(jl_gc_big_alloc);
static const char *GC_POOL_ALLOC_NAME = XSTR(jl_gc_pool_alloc);
static const char *GC_QUEUE_ROOT_NAME = XSTR(jl_gc_queue_root);
<<<<<<< HEAD
static const char *GC_WB_1_NAME = XSTR(jl_gc_wb1_noinline);
static const char *GC_WB_2_NAME = XSTR(jl_gc_wb2_noinline);
=======
#ifdef MMTK_GC
static const char *GC_WB_1_NAME = XSTR(jl_gc_wb1_noinline);
static const char *GC_WB_2_NAME = XSTR(jl_gc_wb2_noinline);
#endif
>>>>>>> master

using jl_intrinsics::addGCAllocAttributes;

Expand Down Expand Up @@ -330,10 +314,7 @@ namespace jl_well_known {
return func;
});

<<<<<<< HEAD
=======
#ifdef MMTK_GC
>>>>>>> master
const WellKnownFunctionDescription GCWriteBarrier1(
GC_WB_1_NAME,
[](const JuliaPassContext &context) {
Expand Down Expand Up @@ -361,8 +342,5 @@ namespace jl_well_known {
func->addFnAttr(Attribute::InaccessibleMemOrArgMemOnly);
return func;
});
<<<<<<< HEAD
=======
#endif
>>>>>>> master
}

0 comments on commit 91dc055

Please sign in to comment.