Gabe Black has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/24783 )

Change subject: base,arch,sim,cpu: Move object file loader components into a namespace.
......................................................................

base,arch,sim,cpu: Move object file loader components into a namespace.

The components in base/loader were moved into a namespace called
Loader. This will make it easier to add loader components with fairly
short natural names which don't invite name collisions.

gem5 should use namespaces more in general for that reason and to make
it easier to write independent components without having to worry about
name collisions being added in the future.

Unfortunately this namespace has the same name as a class used to load
an object file into a process object. These names can be disambiguated
because the Process loader is inside the Process scope and the Loader
namespace is at global scope, but it's still confusing to read.

Fortunately, this shouldn't last for very long since the responsibility
for loading Processes is going to move to a fake OS object which will
expect to load a particular type of Process, for instance, fake 64 bit
x86 linux will load either 32 or 64 bit x86 processes.

That means that the capability to feed any binary that matches the
current build into gem5 and have gem5 figure out what to do with it
will likely be going away in the future. That's likely for the best,
since it will force users to be more explicit about what they're trying
to do, ie what OS they want to try to load a given binary, and also
will prevent loading two or more Processes which are for different OSes
to the same system, something that's possible today as far as I know
since there are no consistency checks.

Change-Id: Iea0012e98f39f5e20a7c351b78cdff9401f5e326
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/24783
Reviewed-by: Gabe Black <gabebl...@google.com>
Maintainer: Gabe Black <gabebl...@google.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/arch/arm/freebsd/fs_workload.cc
M src/arch/arm/freebsd/process.cc
M src/arch/arm/freebsd/process.hh
M src/arch/arm/fs_workload.cc
M src/arch/arm/fs_workload.hh
M src/arch/arm/insts/branch.cc
M src/arch/arm/insts/branch.hh
M src/arch/arm/insts/branch64.cc
M src/arch/arm/insts/branch64.hh
M src/arch/arm/insts/data64.cc
M src/arch/arm/insts/data64.hh
M src/arch/arm/insts/macromem.cc
M src/arch/arm/insts/macromem.hh
M src/arch/arm/insts/mem.cc
M src/arch/arm/insts/mem.hh
M src/arch/arm/insts/mem64.cc
M src/arch/arm/insts/mem64.hh
M src/arch/arm/insts/misc.cc
M src/arch/arm/insts/misc.hh
M src/arch/arm/insts/misc64.cc
M src/arch/arm/insts/misc64.hh
M src/arch/arm/insts/pred_inst.cc
M src/arch/arm/insts/pred_inst.hh
M src/arch/arm/insts/pseudo.cc
M src/arch/arm/insts/pseudo.hh
M src/arch/arm/insts/static_inst.cc
M src/arch/arm/insts/static_inst.hh
M src/arch/arm/insts/sve.cc
M src/arch/arm/insts/sve.hh
M src/arch/arm/insts/sve_macromem.hh
M src/arch/arm/insts/sve_mem.cc
M src/arch/arm/insts/sve_mem.hh
M src/arch/arm/insts/vfp.cc
M src/arch/arm/insts/vfp.hh
M src/arch/arm/isa/templates/sve_mem.isa
M src/arch/arm/linux/fs_workload.cc
M src/arch/arm/linux/process.cc
M src/arch/arm/linux/process.hh
M src/arch/arm/process.cc
M src/arch/arm/process.hh
M src/arch/arm/stacktrace.cc
M src/arch/arm/system.cc
M src/arch/mips/isa/base.isa
M src/arch/mips/isa/formats/branch.isa
M src/arch/mips/isa/formats/control.isa
M src/arch/mips/isa/formats/fp.isa
M src/arch/mips/isa/formats/int.isa
M src/arch/mips/isa/formats/mem.isa
M src/arch/mips/isa/formats/mt.isa
M src/arch/mips/isa/formats/noop.isa
M src/arch/mips/isa/formats/tlbop.isa
M src/arch/mips/isa/formats/trap.isa
M src/arch/mips/isa/formats/unimp.isa
M src/arch/mips/isa/formats/unknown.isa
M src/arch/mips/linux/process.cc
M src/arch/mips/linux/process.hh
M src/arch/mips/process.cc
M src/arch/mips/process.hh
M src/arch/power/insts/branch.cc
M src/arch/power/insts/branch.hh
M src/arch/power/insts/condition.cc
M src/arch/power/insts/condition.hh
M src/arch/power/insts/floating.cc
M src/arch/power/insts/floating.hh
M src/arch/power/insts/integer.cc
M src/arch/power/insts/integer.hh
M src/arch/power/insts/mem.cc
M src/arch/power/insts/mem.hh
M src/arch/power/insts/misc.cc
M src/arch/power/insts/misc.hh
M src/arch/power/insts/static_inst.cc
M src/arch/power/insts/static_inst.hh
M src/arch/power/isa/formats/unimp.isa
M src/arch/power/isa/formats/unknown.isa
M src/arch/power/linux/process.cc
M src/arch/power/linux/process.hh
M src/arch/power/process.cc
M src/arch/power/process.hh
M src/arch/riscv/bare_metal/fs_workload.cc
M src/arch/riscv/bare_metal/fs_workload.hh
M src/arch/riscv/insts/amo.cc
M src/arch/riscv/insts/amo.hh
M src/arch/riscv/insts/compressed.cc
M src/arch/riscv/insts/compressed.hh
M src/arch/riscv/insts/mem.cc
M src/arch/riscv/insts/mem.hh
M src/arch/riscv/insts/pseudo.hh
M src/arch/riscv/insts/standard.cc
M src/arch/riscv/insts/standard.hh
M src/arch/riscv/insts/unknown.hh
M src/arch/riscv/isa/formats/compressed.isa
M src/arch/riscv/isa/formats/standard.isa
M src/arch/riscv/linux/process.cc
M src/arch/riscv/linux/process.hh
M src/arch/riscv/process.cc
M src/arch/riscv/process.hh
M src/arch/sparc/fs_workload.hh
M src/arch/sparc/insts/blockmem.cc
M src/arch/sparc/insts/blockmem.hh
M src/arch/sparc/insts/branch.cc
M src/arch/sparc/insts/branch.hh
M src/arch/sparc/insts/integer.cc
M src/arch/sparc/insts/integer.hh
M src/arch/sparc/insts/mem.cc
M src/arch/sparc/insts/mem.hh
M src/arch/sparc/insts/micro.cc
M src/arch/sparc/insts/micro.hh
M src/arch/sparc/insts/nop.cc
M src/arch/sparc/insts/nop.hh
M src/arch/sparc/insts/priv.cc
M src/arch/sparc/insts/priv.hh
M src/arch/sparc/insts/static_inst.cc
M src/arch/sparc/insts/static_inst.hh
M src/arch/sparc/insts/trap.cc
M src/arch/sparc/insts/trap.hh
M src/arch/sparc/insts/unimp.hh
M src/arch/sparc/insts/unknown.hh
M src/arch/sparc/linux/process.cc
M src/arch/sparc/linux/process.hh
M src/arch/sparc/process.cc
M src/arch/sparc/process.hh
M src/arch/sparc/solaris/process.cc
M src/arch/sparc/solaris/process.hh
M src/arch/x86/faults.cc
M src/arch/x86/fs_workload.cc
M src/arch/x86/insts/macroop.hh
M src/arch/x86/insts/microfpop.cc
M src/arch/x86/insts/microfpop.hh
M src/arch/x86/insts/microldstop.cc
M src/arch/x86/insts/microldstop.hh
M src/arch/x86/insts/micromediaop.cc
M src/arch/x86/insts/micromediaop.hh
M src/arch/x86/insts/microop.hh
M src/arch/x86/insts/microregop.cc
M src/arch/x86/insts/microregop.hh
M src/arch/x86/insts/static_inst.cc
M src/arch/x86/insts/static_inst.hh
M src/arch/x86/isa/formats/cpuid.isa
M src/arch/x86/isa/formats/monitor_mwait.isa
M src/arch/x86/isa/formats/nop.isa
M src/arch/x86/isa/formats/syscall.isa
M src/arch/x86/isa/formats/unimp.isa
M src/arch/x86/isa/formats/unknown.isa
M src/arch/x86/isa/macroop.isa
M src/arch/x86/isa/microops/debug.isa
M src/arch/x86/isa/microops/limmop.isa
M src/arch/x86/isa/microops/seqop.isa
M src/arch/x86/isa/microops/specop.isa
M src/arch/x86/linux/process.cc
M src/arch/x86/process.cc
M src/arch/x86/process.hh
M src/arch/x86/stacktrace.cc
M src/base/cp_annotate.cc
M src/base/cp_annotate.hh
M src/base/loader/dtb_file.cc
M src/base/loader/dtb_file.hh
M src/base/loader/elf_object.cc
M src/base/loader/elf_object.hh
M src/base/loader/image_file.hh
M src/base/loader/image_file_data.cc
M src/base/loader/image_file_data.hh
M src/base/loader/image_file_data.test.cc
M src/base/loader/memory_image.cc
M src/base/loader/memory_image.hh
M src/base/loader/object_file.cc
M src/base/loader/object_file.hh
M src/base/loader/raw_image.hh
M src/base/loader/symtab.cc
M src/base/loader/symtab.hh
M src/cpu/base.cc
M src/cpu/exetrace.cc
M src/cpu/profile.cc
M src/cpu/profile.hh
M src/cpu/static_inst.cc
M src/cpu/static_inst.hh
M src/kern/linux/helpers.cc
M src/mem/abstract_mem.cc
M src/python/pybind11/core.cc
M src/sim/kernel_workload.cc
M src/sim/kernel_workload.hh
M src/sim/process.cc
M src/sim/process.hh
M src/sim/pseudo_inst.cc
M src/sim/syscall_emul.hh
M src/sim/system.hh
M src/sim/workload.hh
M src/unittest/nmtest.cc
M src/unittest/symtest.cc
188 files changed, 1,811 insertions(+), 1,586 deletions(-)

Approvals:
  Gabe Black: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/24783
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Iea0012e98f39f5e20a7c351b78cdff9401f5e326
Gerrit-Change-Number: 24783
Gerrit-PatchSet: 27
Gerrit-Owner: Gabe Black <gabebl...@google.com>
Gerrit-Reviewer: Bobby R. Bruce <bbr...@ucdavis.edu>
Gerrit-Reviewer: Bradford Beckmann <brad.beckm...@amd.com>
Gerrit-Reviewer: Gabe Black <gabebl...@google.com>
Gerrit-Reviewer: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: Jason Lowe-Power <power...@gmail.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to