Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
forked fromtorvalds/linux

Commitfbe3138

Browse files
Doug Smythiesrafaeljw
Doug Smythies
authored andcommitted
tools/power/x86/intel_pstate_tracer: Free the trace buffer memory
The trace buffer memory should be, mostly, freed afterthe buffer has been output.This patch is required before a future patch that will allowthe user to override the default, and specify the trace buffermemory allocation as a command line option.Signed-off-by: Doug Smythies <dsmythies@telus.net>Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parentcc85a6e commitfbe3138

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

‎tools/power/x86/intel_pstate_tracer/intel_pstate_tracer.py‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,16 @@ def set_trace_buffer_size():
411411
print('IO error setting trace buffer size ')
412412
quit()
413413

414+
deffree_trace_buffer():
415+
""" Free the trace buffer memory """
416+
417+
try:
418+
open('/sys/kernel/debug/tracing/buffer_size_kb'
419+
,'w').write("1")
420+
except:
421+
print('IO error setting trace buffer size ')
422+
quit()
423+
414424
defread_trace_data(filename):
415425
""" Read and parse trace data """
416426

@@ -583,4 +593,9 @@ def read_trace_data(filename):
583593
forfinfiles:
584594
fix_ownership(f)
585595

596+
clear_trace_file()
597+
# Free the memory
598+
ifinterval:
599+
free_trace_buffer()
600+
586601
os.chdir('../../')

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp