Skip to content

Commit

Permalink
double buffer size for oneprof
Browse files Browse the repository at this point in the history
  • Loading branch information
zma2 committed Sep 19, 2022
1 parent d1d1c85 commit 887839d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.49.4
0.49.5
5 changes: 4 additions & 1 deletion tools/oneprof/finalizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,10 @@ class Finalizer {
PTI_ASSERT(metric_list.size() == report_size);

size_t time_id = GetMetricId(metric_list, "QueryBeginTime");
PTI_ASSERT(time_id < metric_list.size());
if (time_id >= metric_list.size()) {
// QueryBeginTime metric does not exist
return 0;
}

uint64_t max_time = (props.mask + 1ull) *
static_cast<uint64_t>(NSEC_IN_SEC) / props.freq;
Expand Down
4 changes: 2 additions & 2 deletions tools/oneprof/metric_storage.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#define MAX_REPORT_SIZE 512
#define MAX_REPORT_COUNT 32768
#define MAX_BUFFER_SIZE (MAX_REPORT_COUNT * MAX_REPORT_SIZE)
#define MAX_BUFFER_SIZE (MAX_REPORT_COUNT * MAX_REPORT_SIZE * 2)

#define CACHE_SIZE 134217728

Expand Down Expand Up @@ -243,4 +243,4 @@ class MetricReader {
std::vector<std::ifstream> storage_;
};

#endif // PTI_TOOLS_ONEPROF_METRIC_STORAGE_H_
#endif // PTI_TOOLS_ONEPROF_METRIC_STORAGE_H_

0 comments on commit 887839d

Please sign in to comment.