-
Notifications
You must be signed in to change notification settings - Fork 1
/
knob.cpp
34 lines (30 loc) · 1.29 KB
/
knob.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* knob.cpp
*
* Copyright (C) 2017 Alexandre Luiz Brisighello Filho
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
#include "pin.H"
#include "knob.h"
#include <iostream>
KNOB<string> knob_output_file(KNOB_MODE_WRITEONCE, "pintool", "o", DEFAULT_OUTPUT_FILE, "specify output filename");
KNOB<BOOL> knob_time_based(KNOB_MODE_WRITEONCE, "pintool", "t", DEFAULT_TIME_BASED, "perform time-based evaluation (no-pram)");
KNOB<int> knob_sync_frenquency(KNOB_MODE_WRITEONCE, "pintool", "p", DEFAULT_SYNC_PERIOD, "only sync on a given frenquency");
void knob_welcome()
{
cerr << "===============================================" << std::endl;
cerr << " _ __ (_)_ __ ___ ___ ___| |__ (_) ___\n\
| \'_ \\| | \'_ \\ / _ \\ / __/ __| \'_ \\| |/ _ \\ \n\
| |_) | | | | | (_) | (_| (__| | | | | (_) | \n\
| .__/|_|_| |_|\\___/ \\___\\___|_| |_|_|\\___/ \n\
|_|\n";
cerr << " Application instrumented by PINocchio" << std::endl;
cerr << "===============================================" << std::endl;
}
INT32 knob_usage()
{
cerr << "PINocchio is a MIMD PRAM simulator, keeping all threads always sinced by the number of instructions." << std::endl;
cerr << KNOB_BASE::StringKnobSummary() << std::endl;
return -1;
}