mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	perf: arm-spe: Fix perf report --mem-mode
Since commitbb30acae4c("perf report: Bail out --mem-mode if mem info is not available") "perf mem report" and "perf report --mem-mode" don't allow opening the file unless one of the events has PERF_SAMPLE_DATA_SRC set. SPE doesn't have this set even though synthetic memory data is generated after it is decoded. Fix this issue by setting DATA_SRC on SPE events. This has no effect on the data collected because the SPE driver doesn't do anything with that flag and doesn't generate samples. Fixes:bb30acae4c("perf report: Bail out --mem-mode if mem info is not available") Signed-off-by: James Clark <james.clark@arm.com> Tested-by: Leo Yan <leo.yan@linaro.org> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: German Gomez <german.gomez@arm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: John Garry <john.garry@huawei.com> Cc: Leo Yan <leo.yan@linaro.org> Cc: linux-arm-kernel@lists.infradead.org Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Poirier <mathieu.poirier@linaro.org> Cc: Ravi Bangoria <ravi.bangoria@linux.ibm.com> Cc: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20220408144056.1955535-1-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
		
							parent
							
								
									fa7095c5c3
								
							
						
					
					
						commit
						ffab487052
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
					@ -239,6 +239,12 @@ static int arm_spe_recording_options(struct auxtrace_record *itr,
 | 
				
			||||||
		arm_spe_set_timestamp(itr, arm_spe_evsel);
 | 
							arm_spe_set_timestamp(itr, arm_spe_evsel);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/*
 | 
				
			||||||
 | 
						 * Set this only so that perf report knows that SPE generates memory info. It has no effect
 | 
				
			||||||
 | 
						 * on the opening of the event or the SPE data produced.
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						evsel__set_sample_bit(arm_spe_evsel, DATA_SRC);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Add dummy event to keep tracking */
 | 
						/* Add dummy event to keep tracking */
 | 
				
			||||||
	err = parse_events(evlist, "dummy:u", NULL);
 | 
						err = parse_events(evlist, "dummy:u", NULL);
 | 
				
			||||||
	if (err)
 | 
						if (err)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue