gem5  v19.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
process.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2016 Advanced Micro Devices, Inc.
3  * Copyright (c) 2012 ARM Limited
4  * All rights reserved
5  *
6  * The license below extends only to copyright in the software and shall
7  * not be construed as granting a license to any other intellectual
8  * property including but not limited to intellectual property relating
9  * to a hardware implementation of the functionality of the software
10  * licensed hereunder. You may use the software subject to the license
11  * terms below provided that you ensure that this notice is replicated
12  * unmodified and in its entirety in all distributions of the software,
13  * modified or unmodified, in source code or in binary form.
14  *
15  * Copyright (c) 2001-2005 The Regents of The University of Michigan
16  * All rights reserved.
17  *
18  * Redistribution and use in source and binary forms, with or without
19  * modification, are permitted provided that the following conditions are
20  * met: redistributions of source code must retain the above copyright
21  * notice, this list of conditions and the following disclaimer;
22  * redistributions in binary form must reproduce the above copyright
23  * notice, this list of conditions and the following disclaimer in the
24  * documentation and/or other materials provided with the distribution;
25  * neither the name of the copyright holders nor the names of its
26  * contributors may be used to endorse or promote products derived from
27  * this software without specific prior written permission.
28  *
29  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
30  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
31  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
32  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
33  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
34  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
35  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
36  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
37  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
38  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
39  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40  *
41  * Authors: Nathan Binkert
42  * Steve Reinhardt
43  * Ali Saidi
44  * Brandon Potter
45  */
46 
47 #include "sim/process.hh"
48 
49 #include <fcntl.h>
50 #include <unistd.h>
51 
52 #include <array>
53 #include <climits>
54 #include <csignal>
55 #include <map>
56 #include <string>
57 #include <vector>
58 
59 #include "base/intmath.hh"
61 #include "base/loader/symtab.hh"
62 #include "base/statistics.hh"
63 #include "config/the_isa.hh"
64 #include "cpu/thread_context.hh"
65 #include "mem/page_table.hh"
67 #include "params/Process.hh"
68 #include "sim/emul_driver.hh"
69 #include "sim/fd_array.hh"
70 #include "sim/fd_entry.hh"
71 #include "sim/redirect_path.hh"
72 #include "sim/syscall_desc.hh"
73 #include "sim/system.hh"
74 
75 using namespace std;
76 using namespace TheISA;
77 
78 namespace
79 {
80 
81 typedef std::vector<Process::Loader *> LoaderList;
82 
83 LoaderList &
84 process_loaders()
85 {
86  static LoaderList loaders;
87  return loaders;
88 }
89 
90 } // anonymous namespace
91 
93 {
94  process_loaders().emplace_back(this);
95 }
96 
97 Process *
98 Process::tryLoaders(ProcessParams *params, ObjectFile *obj_file)
99 {
100  for (auto &loader: process_loaders()) {
101  Process *p = loader->load(params, obj_file);
102  if (p)
103  return p;
104  }
105 
106  return nullptr;
107 }
108 
109 static std::string
110 normalize(std::string& directory)
111 {
112  if (directory.back() != '/')
113  directory += '/';
114  return directory;
115 }
116 
117 Process::Process(ProcessParams *params, EmulationPageTable *pTable,
118  ObjectFile *obj_file)
119  : SimObject(params), system(params->system),
120  useArchPT(params->useArchPT),
121  kvmInSE(params->kvmInSE),
122  useForClone(false),
123  pTable(pTable),
124  initVirtMem(system->getSystemPort(), this,
126  objFile(obj_file),
127  argv(params->cmd), envp(params->env),
128  executable(params->executable),
129  tgtCwd(normalize(params->cwd)),
130  hostCwd(checkPathRedirect(tgtCwd)),
131  release(params->release),
132  _uid(params->uid), _euid(params->euid),
133  _gid(params->gid), _egid(params->egid),
134  _pid(params->pid), _ppid(params->ppid),
135  _pgid(params->pgid), drivers(params->drivers),
136  fds(make_shared<FDArray>(params->input, params->output, params->errout)),
137  childClearTID(0)
138 {
139  if (_pid >= System::maxPID)
140  fatal("_pid is too large: %d", _pid);
141 
142  auto ret_pair = system->PIDs.emplace(_pid);
143  if (!ret_pair.second)
144  fatal("_pid %d is already used", _pid);
145 
158  _tgid = params->pid;
159 
160  exitGroup = new bool();
161  sigchld = new bool();
162 
163  image = objFile->buildImage();
164 
165  if (!debugSymbolTable) {
170  delete debugSymbolTable;
171  debugSymbolTable = nullptr;
172  }
173  }
174 }
175 
176 void
178  Process *np, RegVal flags)
179 {
180 #ifndef CLONE_VM
181 #define CLONE_VM 0
182 #endif
183 #ifndef CLONE_FILES
184 #define CLONE_FILES 0
185 #endif
186 #ifndef CLONE_THREAD
187 #define CLONE_THREAD 0
188 #endif
189  if (CLONE_VM & flags) {
195  delete np->pTable;
196  np->pTable = pTable;
197  auto &proxy = dynamic_cast<SETranslatingPortProxy &>(
198  ntc->getVirtProxy());
199  proxy.setPageTable(np->pTable);
200 
201  np->memState = memState;
202  } else {
207  typedef std::vector<pair<Addr,Addr>> MapVec;
208  MapVec mappings;
209  pTable->getMappings(&mappings);
210 
211  for (auto map : mappings) {
212  Addr paddr, vaddr = map.first;
213  bool alloc_page = !(np->pTable->translate(vaddr, paddr));
214  np->replicatePage(vaddr, paddr, otc, ntc, alloc_page);
215  }
216 
217  *np->memState = *memState;
218  }
219 
220  if (CLONE_FILES & flags) {
226  np->fds = fds;
227  } else {
235  std::shared_ptr<FDArray> nfds = np->fds;
236  for (int tgt_fd = 0; tgt_fd < fds->getSize(); tgt_fd++) {
237  std::shared_ptr<FDEntry> this_fde = (*fds)[tgt_fd];
238  if (!this_fde) {
239  nfds->setFDEntry(tgt_fd, nullptr);
240  continue;
241  }
242  nfds->setFDEntry(tgt_fd, this_fde->clone());
243 
244  auto this_hbfd = std::dynamic_pointer_cast<HBFDEntry>(this_fde);
245  if (!this_hbfd)
246  continue;
247 
248  int this_sim_fd = this_hbfd->getSimFD();
249  if (this_sim_fd <= 2)
250  continue;
251 
252  int np_sim_fd = dup(this_sim_fd);
253  assert(np_sim_fd != -1);
254 
255  auto nhbfd = std::dynamic_pointer_cast<HBFDEntry>((*nfds)[tgt_fd]);
256  nhbfd->setSimFD(np_sim_fd);
257  }
258  }
259 
260  if (CLONE_THREAD & flags) {
261  np->_tgid = _tgid;
262  delete np->exitGroup;
263  np->exitGroup = exitGroup;
264  }
265 
266  np->argv.insert(np->argv.end(), argv.begin(), argv.end());
267  np->envp.insert(np->envp.end(), envp.begin(), envp.end());
268 }
269 
270 void
272 {
274 
275  using namespace Stats;
276 
278  .name(name() + ".numSyscalls")
279  .desc("Number of system calls")
280  ;
281 }
282 
283 void
285 {
287  for (it = contextIds.begin(); it != contextIds.end(); it++) {
288  if (*it == context_id) {
289  contextIds.erase(it);
290  return;
291  }
292  }
293  warn("Unable to find thread context to revoke");
294 }
295 
296 void
298 {
299  // Patch the ld_bias for dynamic executables.
300  updateBias();
301 
302  if (objFile->getInterpreter())
304 }
305 
306 void
308 {
309  if (contextIds.empty())
310  fatal("Process %s is not associated with any HW contexts!\n", name());
311 
312  // first thread context for this process... initialize & enable
314 
315  // mark this context as active so it will start ticking.
316  tc->activate();
317 
318  pTable->initState();
319 
320  // load object file into target memory
323 }
324 
327 {
328  fds->updateFileOffsets();
329  return DrainState::Drained;
330 }
331 
332 void
333 Process::allocateMem(Addr vaddr, int64_t size, bool clobber)
334 {
335  int npages = divCeil(size, (int64_t)PageBytes);
336  Addr paddr = system->allocPhysPages(npages);
337  pTable->map(vaddr, paddr, size,
338  clobber ? EmulationPageTable::Clobber :
340 }
341 
342 void
344  ThreadContext *new_tc, bool allocate_page)
345 {
346  if (allocate_page)
347  new_paddr = system->allocPhysPages(1);
348 
349  // Read from old physical page.
350  uint8_t *buf_p = new uint8_t[PageBytes];
351  old_tc->getVirtProxy().readBlob(vaddr, buf_p, PageBytes);
352 
353  // Create new mapping in process address space by clobbering existing
354  // mapping (if any existed) and then write to the new physical page.
355  bool clobber = true;
356  pTable->map(vaddr, new_paddr, PageBytes, clobber);
357  new_tc->getVirtProxy().writeBlob(vaddr, buf_p, PageBytes);
358  delete[] buf_p;
359 }
360 
361 bool
363 {
364  Addr stack_min = memState->getStackMin();
365  Addr stack_base = memState->getStackBase();
366  Addr max_stack_size = memState->getMaxStackSize();
367 
368  // Check if this is already on the stack and there's just no page there
369  // yet.
370  if (vaddr >= stack_min && vaddr < stack_base) {
372  return true;
373  }
374 
375  // We've accessed the next page of the stack, so extend it to include
376  // this address.
377  if (vaddr < stack_min && vaddr >= stack_base - max_stack_size) {
378  while (vaddr < stack_min) {
379  stack_min -= TheISA::PageBytes;
380  if (stack_base - stack_min > max_stack_size)
381  fatal("Maximum stack size exceeded\n");
382  allocateMem(stack_min, TheISA::PageBytes);
383  inform("Increasing stack size by one page.");
384  }
385  memState->setStackMin(stack_min);
386  return true;
387  }
388  return false;
389 }
390 
391 void
393 {
394  memState->serialize(cp);
395  pTable->serialize(cp);
401  warn("Checkpoints for file descriptors currently do not work.");
402 }
403 
404 void
406 {
407  memState->unserialize(cp);
408  pTable->unserialize(cp);
413  warn("Checkpoints for file descriptors currently do not work.");
414  // The above returns a bool so that you could do something if you don't
415  // find the param in the checkpoint if you wanted to, like set a default
416  // but in this case we'll just stick with the instantiated value if not
417  // found.
418 }
419 
420 bool
421 Process::map(Addr vaddr, Addr paddr, int size, bool cacheable)
422 {
423  pTable->map(vaddr, paddr, size,
424  cacheable ? EmulationPageTable::MappingFlags(0) :
426  return true;
427 }
428 
429 void
430 Process::doSyscall(int64_t callnum, ThreadContext *tc, Fault *fault)
431 {
432  numSyscalls++;
433 
434  SyscallDesc *desc = getDesc(callnum);
435  if (desc == nullptr)
436  fatal("Syscall %d out of range", callnum);
437 
438  desc->doSyscall(callnum, tc, fault);
439 }
440 
441 RegVal
443 {
444  return getSyscallArg(tc, i);
445 }
446 
448 Process::findDriver(std::string filename)
449 {
450  for (EmulatedDriver *d : drivers) {
451  if (d->match(filename))
452  return d;
453  }
454 
455  return nullptr;
456 }
457 
458 std::string
459 Process::checkPathRedirect(const std::string &filename)
460 {
461  // If the input parameter contains a relative path, convert it.
462  // The target version of the current working directory is fine since
463  // we immediately convert it using redirect paths into a host version.
464  auto abs_path = absolutePath(filename, false);
465 
466  for (auto path : system->redirectPaths) {
467  // Search through the redirect paths to see if a starting substring of
468  // our path falls into any buckets which need to redirected.
469  if (startswith(abs_path, path->appPath())) {
470  std::string tail = abs_path.substr(path->appPath().size());
471 
472  // If this path needs to be redirected, search through a list
473  // of targets to see if we can match a valid file (or directory).
474  for (auto host_path : path->hostPaths()) {
475  if (access((host_path + tail).c_str(), R_OK) == 0) {
476  // Return the valid match.
477  return host_path + tail;
478  }
479  }
480  // The path needs to be redirected, but the file or directory
481  // does not exist on the host filesystem. Return the first
482  // host path as a default.
483  return path->hostPaths()[0] + tail;
484  }
485  }
486 
487  // The path does not need to be redirected.
488  return abs_path;
489 }
490 
491 void
493 {
494  ObjectFile *interp = objFile->getInterpreter();
495 
496  if (!interp || !interp->relocatable())
497  return;
498 
499  // Determine how large the interpreters footprint will be in the process
500  // address space.
501  Addr interp_mapsize = roundUp(interp->mapSize(), TheISA::PageBytes);
502 
503  // We are allocating the memory area; set the bias to the lowest address
504  // in the allocated memory region.
505  Addr mmap_end = memState->getMmapEnd();
506  Addr ld_bias = mmapGrowsDown() ? mmap_end - interp_mapsize : mmap_end;
507 
508  // Adjust the process mmap area to give the interpreter room; the real
509  // execve system call would just invoke the kernel's internal mmap
510  // functions to make these adjustments.
511  mmap_end = mmapGrowsDown() ? ld_bias : mmap_end + interp_mapsize;
512  memState->setMmapEnd(mmap_end);
513 
514  interp->updateBias(ld_bias);
515 }
516 
517 ObjectFile *
519 {
520  return objFile->getInterpreter();
521 }
522 
523 Addr
525 {
526  ObjectFile *interp = getInterpreter();
527 
528  return interp ? interp->bias() : objFile->bias();
529 }
530 
531 Addr
533 {
534  ObjectFile *interp = getInterpreter();
535 
536  return interp ? interp->entryPoint() : objFile->entryPoint();
537 }
538 
539 std::string
540 Process::absolutePath(const std::string &filename, bool host_filesystem)
541 {
542  if (filename.empty() || startswith(filename, "/"))
543  return filename;
544 
545  // Construct the absolute path given the current working directory for
546  // either the host filesystem or target filesystem. The distinction only
547  // matters if filesystem redirection is utilized in the simulation.
548  auto path_base = std::string();
549  if (host_filesystem) {
550  path_base = hostCwd;
551  assert(!hostCwd.empty());
552  } else {
553  path_base = tgtCwd;
554  assert(!tgtCwd.empty());
555  }
556 
557  // Add a trailing '/' if the current working directory did not have one.
558  normalize(path_base);
559 
560  // Append the filename onto the current working path.
561  auto absolute_path = path_base + filename;
562 
563  return absolute_path;
564 }
565 
566 Process *
567 ProcessParams::create()
568 {
569  // If not specified, set the executable parameter equal to the
570  // simulated system's zeroth command line parameter
571  if (executable == "") {
572  executable = cmd[0];
573  }
574 
576  fatal_if(!obj_file, "Cannot load object file %s.", executable);
577 
578  Process *process = Process::tryLoaders(this, obj_file);
579  fatal_if(!process, "Unknown error creating process object.");
580 
581  return process;
582 }
virtual SyscallDesc * getDesc(int callnum)=0
ObjectFile * objFile
Definition: process.hh:217
virtual void map(Addr vaddr, Addr paddr, int64_t size, uint64_t flags=0)
Maps a virtual memory region to a physical memory region.
Definition: page_table.cc:49
virtual bool relocatable() const
Definition: object_file.hh:109
void revokeThreadContext(int context_id)
After delegating a thread context to a child process no longer should relate to the ThreadContext...
Definition: process.cc:284
#define fatal(...)
This implements a cprintf based fatal() function.
Definition: logging.hh:175
static void output(const char *filename)
Definition: debug.cc:63
Bitfield< 7 > i
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition: page_table.cc:189
DrainState
Object drain/handover states.
Definition: drain.hh:71
std::vector< RedirectPath * > redirectPaths
Definition: system.hh:656
bool write(const PortProxy &proxy) const
Definition: memory_image.cc:50
static std::stack< std::string > path
Definition: serialize.hh:267
MemoryImage interpImage
Definition: process.hh:219
std::vector< ContextID > contextIds
Definition: process.hh:167
ObjectFile * createObjectFile(const std::string &fname, bool raw)
Definition: object_file.cc:64
void doSyscall(int callnum, ThreadContext *tc, Fault *fault)
Interface for invoking the system call funcion pointer.
Definition: syscall_desc.cc:48
void allocateMem(Addr vaddr, int64_t size, bool clobber=false)
Definition: process.cc:333
bool * sigchld
Definition: process.hh:292
#define CLONE_VM
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition: process.cc:405
virtual ObjectFile * getInterpreter() const
Definition: object_file.hh:108
SETranslatingPortProxy initVirtMem
Definition: process.hh:183
void regStats() override
Callback to set stat parameters.
Definition: process.cc:271
Stats::Scalar numSyscalls
Definition: process.hh:172
virtual PortProxy & getVirtProxy()=0
void setPageTable(EmulationPageTable *p)
uint64_t _tgid
Definition: process.hh:275
Addr allocPhysPages(int npages)
Allocate npages contiguous unused physical pages.
Definition: system.cc:428
uint64_t RegVal
Definition: types.hh:168
virtual void regStats()
Callback to set stat parameters.
Definition: group.cc:66
virtual Addr mapSize() const
Definition: object_file.hh:111
void setSimFD(int sim_fd)
Definition: fd_entry.hh:97
SymbolTable * debugSymbolTable
Global unified debugging symbol table (for target).
Definition: symtab.cc:45
Overload hash function for BasicBlockRange type.
Definition: vec_reg.hh:586
void doSyscall(int64_t callnum, ThreadContext *tc, Fault *fault)
Definition: process.cc:430
ObjectFile * getInterpreter()
Definition: process.cc:518
void initState() override
initState() is called on each SimObject when not restoring from a checkpoint.
Definition: process.cc:307
static Process * tryLoaders(ProcessParams *params, ObjectFile *obj_file)
Definition: process.cc:98
std::string executable
Definition: process.hh:222
Definition: cprintf.cc:42
T roundUp(const T &val, const U &align)
This function is used to align addresses in memory.
Definition: intmath.hh:168
std::shared_ptr< MemState > memState
Definition: process.hh:283
ThreadContext is the external interface to all thread state for anything outside of the CPU...
Declaration of Statistics objects.
STL vector class.
Definition: stl.hh:40
ThreadContext * getThreadContext(ContextID tid) const
Definition: system.hh:194
DrainState drain() override
Notify an object that it needs to drain its state.
Definition: process.cc:326
void replicatePage(Addr vaddr, Addr new_paddr, ThreadContext *old_tc, ThreadContext *new_tc, bool alloc_page)
Definition: process.cc:343
virtual void updateBias(Addr bias_addr)
Definition: object_file.hh:116
int getSimFD() const
Definition: fd_entry.hh:94
virtual MemoryImage buildImage() const =0
#define inform(...)
Definition: logging.hh:213
std::string absolutePath(const std::string &path, bool host_fs)
Return an absolute path given a relative path paired with the current working directory of the proces...
Definition: process.cc:540
static const int maxPID
Definition: system.hh:644
bool translate(Addr vaddr, Addr &paddr)
Translate function.
Definition: page_table.cc:144
bool map(Addr vaddr, Addr paddr, int size, bool cacheable=true)
Maps a contiguous range of virtual addresses in this process&#39;s address space to a contiguous range of...
Definition: process.cc:421
void writeBlob(Addr addr, const void *p, int size) const
Same as tryWriteBlob, but insists on success.
Definition: port_proxy.hh:189
uint64_t _pid
Definition: process.hh:272
std::set< int > PIDs
Process set to track which PIDs have already been allocated.
Definition: system.hh:647
static std::string normalize(std::string &directory)
Definition: process.cc:110
Bitfield< 9 > d
virtual RegVal getSyscallArg(ThreadContext *tc, int &i)=0
virtual bool loadLocalSymbols(SymbolTable *symtab, Addr base=0, Addr offset=0, Addr mask=MaxAddr)
Definition: object_file.hh:96
Addr getStartPC()
Definition: process.cc:532
Extends the base class to include a host-backed file descriptor field that records the integer used t...
Definition: fd_entry.hh:76
System * system
Definition: process.hh:170
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
Definition: logging.hh:203
T roundDown(const T &val, const U &align)
This function is used to align addresses in memory.
Definition: intmath.hh:185
std::string tgtCwd
The cwd members are used to track changes to the current working directory for the purpose of executi...
Definition: process.hh:259
std::vector< std::string > envp
Definition: process.hh:221
virtual void activate()=0
Set the status to Active.
virtual void initState()
Definition: page_table.hh:102
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:142
Draining buffers pending serialization/handover.
virtual const std::string name() const
Definition: sim_object.hh:120
EmulatedDriver * findDriver(std::string filename)
Find an emulated device driver.
Definition: process.cc:448
virtual Addr bias() const
Definition: object_file.hh:120
bool startswith(const char *s, const char *prefix)
Return true if &#39;s&#39; starts with the prefix string &#39;prefix&#39;.
Definition: str.hh:227
const Addr PageBytes
Definition: isa_traits.hh:47
Bitfield< 15 > system
Definition: misc.hh:999
void readBlob(Addr addr, void *p, int size) const
Higher level interfaces based on the above.
Definition: port_proxy.hh:179
This class provides the wrapper interface for the system call implementations which are defined in th...
Definition: syscall_desc.hh:69
Derived & name(const std::string &name)
Set the name and marks this stat to print at the end of simulation.
Definition: statistics.hh:279
bool fixupStackFault(Addr vaddr)
Attempt to fix up a fault at vaddr by allocating a page on the stack.
Definition: process.cc:362
virtual bool loadWeakSymbols(SymbolTable *symtab, Addr base=0, Addr offset=0, Addr mask=MaxAddr)
Definition: object_file.hh:102
EmulationPageTable * pTable
Definition: process.hh:181
Declarations of a non-full system Page Table.
std::ostream CheckpointOut
Definition: serialize.hh:68
void updateBias()
Definition: process.cc:492
Process(ProcessParams *params, EmulationPageTable *pTable, ObjectFile *obj_file)
Definition: process.cc:117
virtual void clone(ThreadContext *old_tc, ThreadContext *new_tc, Process *new_p, RegVal flags)
Definition: process.cc:177
std::string checkPathRedirect(const std::string &filename)
Redirect file path if it matches any keys initialized by system object.
Definition: process.cc:459
T divCeil(const T &a, const U &b)
Definition: intmath.hh:153
Addr entryPoint() const
Definition: object_file.hh:131
TranslatingPortProxy Object Declaration for SE.
Bitfield< 4 > width
#define CLONE_FILES
EmulatedDriver is an abstract base class for fake SE-mode device drivers.
Definition: emul_driver.hh:52
virtual bool mmapGrowsDown() const
Does mmap region grow upward or downward from mmapEnd? Most platforms grow downward, but a few (such as Alpha) grow upward instead, so they can override this method to return false.
Definition: process.hh:143
void getMappings(std::vector< std::pair< Addr, Addr >> *addr_mappings)
Definition: page_table.cc:98
void serialize(CheckpointOut &cp) const override
Serialize an object.
Definition: page_table.cc:173
#define CLONE_THREAD
Derived & desc(const std::string &_desc)
Set the description and marks this stat to print at the end of simulation.
Definition: statistics.hh:312
void serialize(CheckpointOut &cp) const override
Serialize an object.
Definition: process.cc:392
#define warn(...)
Definition: logging.hh:212
std::string hostCwd
Definition: process.hh:260
std::vector< std::string > argv
Definition: process.hh:220
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
Definition: process.cc:297
Bitfield< 0 > p
std::shared_ptr< FaultBase > Fault
Definition: types.hh:240
virtual bool loadGlobalSymbols(SymbolTable *symtab, Addr base=0, Addr offset=0, Addr mask=MaxAddr)
Definition: object_file.hh:90
Abstract superclass for simulation objects.
Definition: sim_object.hh:96
Addr getBias()
Definition: process.cc:524
MemoryImage image
Definition: process.hh:218
bool * exitGroup
Definition: process.hh:282
std::shared_ptr< FDArray > fds
Definition: process.hh:280
std::vector< EmulatedDriver * > drivers
Definition: process.hh:278

Generated on Fri Feb 28 2020 16:26:56 for gem5 by doxygen 1.8.13