Deleted Added
sdiff udiff text old ( 10129:eb34ae5204b8 ) new ( 10189:94d6ffac1e9b )
full compact
1/*
2 * Copyright (c) 2012-2013 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 44 unchanged lines hidden (view full) ---

53 samplePeriodicEvent(this),
54 samplePeriodTicks(params->sample_period),
55 readAddrMask(params->read_addr_mask),
56 writeAddrMask(params->write_addr_mask),
57 stats(params),
58 traceStream(NULL),
59 system(params->system)
60{
61 // If we are using a trace file, then open the file
62 if (params->trace_enable) {
63 std::string filename;
64 if (params->trace_file != "") {
65 // If the trace file is not specified as an absolute path,
66 // append the current simulation output directory
67 filename = simout.resolve(params->trace_file);
68
69 std::string suffix = ".gz";
70 // If trace_compress has been set, check the suffix. Append
71 // accordingly.
72 if (params->trace_compress &&
73 filename.compare(filename.size() - suffix.size(), suffix.size(),
74 suffix) != 0)
75 filename = filename + suffix;
76 } else {
77 // Generate a filename from the name of the SimObject. Append .trc
78 // and .gz if we want compression enabled.
79 filename = simout.resolve(name() + ".trc" +
80 (params->trace_compress ? ".gz" : ""));
81 }
82
83 traceStream = new ProtoOutputStream(filename);
84
85 // Create a protobuf message for the header and write it to
86 // the stream
87 Message::PacketHeader header_msg;
88 header_msg.set_obj_id(name());
89 header_msg.set_tick_freq(SimClock::Frequency);
90 traceStream->write(header_msg);

--- 509 unchanged lines hidden ---